Documentation ¶
Overview ¶
Package model @Author liming.dirac @Date 2023/6/4 @Description:
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct { ID int64 `gorm:"column:id"` Name string `gorm:"column:name"` Balance int64 `gorm:"column:balance"` CreateTime time.Time `gorm:"column:create_time"` UpdateTime time.Time `gorm:"column:update_time"` Deleted bool `gorm:"column:deleted"` }
User db model struct, will be mapped to row of db by ORM.
type UserUpdate ¶
type UserUpdate struct { ID *int64 `sql_field:"id"` Name *string `sql_field:"name"` Balance *int64 `gorm:"column:balance"` BalanceAdd *int64 `gorm:"column:balance" sql_expr:"+"` BalanceMinus *int64 `gorm:"column:balance" sql_expr:"-"` UpdateTime *time.Time `sql_field:"update_time"` Deleted *bool `sql_field:"deleted"` }
type UserWhere ¶
type UserWhere struct { ID *int64 `sql_field:"id" sql_operator:"="` IDIn []int64 `sql_field:"id" sql_operator:"in"` Name *string `sql_field:"name" sql_operator:"="` NameLike *string `sql_field:"name" sql_operator:"like"` CreateTimeGT *time.Time `sql_field:"create_time" sql_operator:">"` Deleted *bool `sql_field:"deleted" sql_operator:"="` }
UserWhere db where struct, will be mapped to SQL where condition by ORM.
Click to show internal directories.
Click to hide internal directories.