Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Good ¶
type Good struct { UUIDColumn Code string `gorm:"column:code;type:varchar(10);not null;unique"` Name string `gorm:"column:name;type:varchar(20);not null"` Description string `gorm:"column:description"` IsActive bool `gorm:"column:is_active;default:1"` GoodStock GoodStock `gorm:"foreignKey:GoodID"` TimestampColumn }
type GoodSnapShotColumn ¶
type GoodSnapShotColumn struct {
GoodSnapShot datatypes.JSON `gorm:"column:good_snapshot;default:'{}'"`
}
func (*GoodSnapShotColumn) ParseGoodSnapshot ¶
func (m *GoodSnapShotColumn) ParseGoodSnapshot() (b []byte, err error)
type GoodStock ¶
type GoodStock struct { ID uint `gorm:"column:id;primaryKey"` Total int `gorm:"column:total;default:0"` GoodID string `gorm:"column:good_id"` TimestampColumn }
type Order ¶
type Order struct { UUIDColumn RequestAt time.Time `gorm:"column:request_at"` Total int `gorm:"column:total"` Type int `gorm:"column:type"` GoodSnapShotColumn TimestampColumn OrderItem []*OrderItem `gorm:"foreignKey:OrderID"` CountItem int `gorm:"column:count_item"` }
func (Order) GetOrderTypeName ¶
func (*Order) ParseGoodSnapshot ¶
type OrderItem ¶
type OrderItem struct { UUIDColumn OrderID string `gorm:"column:order_id"` Order Order `gorm:"foreignKey:OrderID"` Total int `gorm:"column:total"` GoodID string `gorm:"column:good_id"` GoodSnapShotColumn TimestampColumn }
type TimestampColumn ¶
type UUIDColumn ¶
type UUIDColumn struct {
ID string `gorm:"column:id;type:varchar(36);not null;primaryKey"`
}
func GenerateUUID ¶
func GenerateUUID() UUIDColumn
type User ¶
type User struct { UUIDColumn FullName string `gorm:"column:fullName"` Email string `gorm:"column:email"` Password string `gorm:"column:password"` TimestampColumn }
Click to show internal directories.
Click to hide internal directories.