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"` TestFk string `json:"test_fk" sp:"fk('ComplexModelC')"` // one to one TestManyFk string `json:"test_many_fk" sp:"fk:ComplexModelC multiple"` // one to many }
type CustomReqBValid ¶ added in v1.0.8
type CustomReqBValid struct {
Desc string `json:"desc" validate:"required"`
}
type CustomReqValid ¶ added in v1.0.8
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 TestModelA struct { Id uint64 `xorm:"autoincr pk unique" json:"id"` Name string `xorm:"varchar(20)" comment:"名称"` }
func (TestModelA) SpAction ¶ added in v1.3.7
func (u TestModelA) SpAction() simple_admin.CustomAction
自定义action
func (*TestModelA) SpAlias ¶ added in v1.4.7
func (u *TestModelA) SpAlias() string
func (*TestModelA) SpDeleteAfter ¶ added in v1.5.0
func (u *TestModelA) SpDeleteAfter()
func (*TestModelA) SpDeleteBefore ¶ added in v1.5.0
func (u *TestModelA) SpDeleteBefore()
func (*TestModelA) SpInsertAfter ¶ added in v1.4.3
func (u *TestModelA) SpInsertAfter()
func (*TestModelA) SpInsertBefore ¶ added in v1.4.3
func (u *TestModelA) SpInsertBefore()
type TestModelB ¶
type TestStructComplexModel ¶
type TestUserModel ¶
Click to show internal directories.
Click to hide internal directories.