entities

package
v0.0.0-...-d389d3b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	common.Entity
	// ID        common.PrimaryID `json:"id"`
	Name      string    `json:"name"`
	Email     string    `json:"email"`
	Age       uint8     `json:"age"`
	Birthday  time.Time `json:"time"`
	CreatedAt time.Time `gorm:"autoCreateTime" json:"createdAt"` // auditable
	UpdatedAt time.Time `gorm:"autoUpdateTime" json:"updated"`   // auditable
}

User model.

func NewUser

func NewUser(name string, email string, age uint8, birthday time.Time) User

func NewUserWithID

func NewUserWithID(id common.PrimaryID, name string, email string, age uint8, birthday time.Time) User

func (User) TableName

func (u User) TableName() string

TableName gives table name of model.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL