Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ComplexModelC ¶
type ComplexModelD ¶
type ComplexModelD struct {
Id uint64 `xorm:"autoincr pk unique" json:"id"`
Name string `xorm:"varchar(20)" json:"name"`
TestString string `xorm:"varchar(20)" json:"test_string"`
TestInt int `xorm:"" json:"test_int"`
TestInt8 int8 `xorm:"" json:"test_int_8"`
TestInt16 int16 `xorm:"" json:"test_int_16"`
TestInt32 int32 `xorm:"" json:"test_int_32"`
TestInt64 int64 `xorm:"" json:"test_int_64"`
TestUint uint `xorm:"" json:"test_uint"`
TestUint8 uint8 `xorm:"" json:"test_uint_8"`
TestUint16 uint16 `xorm:"" json:"test_uint_16"`
TestUint32 uint32 `xorm:"" json:"test_uint_32"`
TestUint64 uint64 `xorm:"" json:"test_uint_64"`
TestFloat32 float32 `json:"test_float_32"`
TestFloat64 float64 `json:"test_float_64"`
TestTimeDuration time.Duration `json:"test_time_duration"`
TestTimeTime time.Time `json:"test_time_time"`
TestBool bool `json:"test_bool"`
}
type ModelBase ¶
type ModelBase struct {
Id uint64 `xorm:"autoincr pk unique" json:"id"`
Uid string `xorm:"varchar(36) unique index notnull" json:"uid" sp:"autogen"`
CreateTime time.Time `xorm:"created index" json:"create_time"`
UpdateTime time.Time `xorm:"updated" json:"update_time"`
DeletedAt time.Time `xorm:"deleted" json:"deleted_at"`
Version uint16 `xorm:"version" json:"version"` //版本号
Status uint8 `xorm:"default(0)" json:"status"` // 当前状态 0 正常 其他都不正常
}
func (*ModelBase) BeforeInsert ¶
func (u *ModelBase) BeforeInsert()
type TestModelA ¶
type TestModelB ¶
type TestStructComplexModel ¶
type TestUserModel ¶
Click to show internal directories.
Click to hide internal directories.