Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicModel ¶
type Friendship ¶
type Friendship struct { BasicModel // 继承 BasicModel 结构体 User1ID string `gorm:"not null;index" json:"user1_id"` // 用户1在关系中的ID,非空,设定索引 User2ID string `gorm:"not null;index" json:"user2_id"` // 用户2在关系中的ID,非空,设定索引 }
Friendship ...
type User ¶
type User struct { BasicModel // 继承 BasicModel 结构体 Account string `gorm:"type:varchar(300);uniqueIndex" json:"account"` // 账号,长度300,设定唯一索引 FullName string `gorm:"type:varchar(300)" json:"full_name"` // 姓名,长度300 Nickname string `gorm:"type:varchar(300)" json:"nickname"` // 昵称,长度300 Birthday string `gorm:"type:varchar(300)" json:"birthday"` // 生日,长度300 Email string `gorm:"type:varchar(300)" json:"email"` // 邮箱,长度300 About string `gorm:"type:varchar(600)" json:"about"` // 用户简介,长度600 Password string `gorm:"type:varchar(300)" json:"password"` // 用户密码,长度300 Avatar string `gorm:"type:varchar(300)" json:"avatar"` }
Click to show internal directories.
Click to hide internal directories.