Documentation ¶
Index ¶
Constants ¶
View Source
const TableNameBook = "book"
View Source
const TableNameUser = "user"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Book ¶
type Book struct { ID uint64 `gorm:"column:id;primaryKey;autoIncrement:true;comment:id" json:"id"` UID string `gorm:"column:uid;not null;comment:uid" json:"uid"` Title string `gorm:"column:title;not null;comment:title" json:"title"` Author string `gorm:"column:author;not null;comment:author" json:"author"` Pages int `gorm:"column:pages;not null;comment:page num of book" json:"pages"` Extra string `gorm:"column:extra;not null;comment:extra info of book" json:"extra"` CreatedAt *time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP;autoCreateTime;comment:created time" json:"created_at"` UpdatedAt *time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP;autoUpdateTime;comment:updated time" json:"updated_at"` DeletedAt soft_delete.DeletedAt `gorm:"column:deleted_at;not null;comment:deleted time;softDelete:milli" json:"deleted_at"` }
Book mapped from table <book>
type User ¶
type User struct { ID uint64 `gorm:"column:id;primaryKey;autoIncrement:true;comment:id" json:"id"` UID string `gorm:"column:uid;not null;comment:uid" json:"uid"` Email string `gorm:"column:email;not null;comment:email" json:"email"` Password string `gorm:"column:password;not null;comment:password" json:"password"` Nickname string `gorm:"column:nickname;not null;comment:nickname" json:"nickname"` CreatedAt *time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP;autoCreateTime;comment:created time" json:"created_at"` UpdatedAt *time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP;autoUpdateTime;comment:updated time" json:"updated_at"` DeletedAt soft_delete.DeletedAt `gorm:"column:deleted_at;not null;comment:deleted time;softDelete:milli" json:"deleted_at"` }
User mapped from table <user>
Click to show internal directories.
Click to hide internal directories.