Documentation ¶
Index ¶
Constants ¶
View Source
const TableNameRelation = "relations"
View Source
const TableNameUser = "users"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Relation ¶
type Relation struct { ID int64 `gorm:"column:id;primaryKey" json:"id"` // 主键ID ToUserID int64 `gorm:"column:to_user_id" json:"to_user_id"` // 被关注用户ID FollowerID int64 `gorm:"column:follower_id" json:"follower_id"` // 关注用户ID CreatedAt time.Time `gorm:"column:created_at;default:CURRENT_TIMESTAMP" json:"created_at"` UpdatedAt time.Time `gorm:"column:updated_at;default:CURRENT_TIMESTAMP" json:"updated_at"` DeletedAt gorm.DeletedAt `gorm:"column:deleted_at" json:"deleted_at"` }
Relation mapped from table <relations>
type User ¶
type User struct { ID int64 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"` // 主键ID Username string `gorm:"column:username" json:"username"` // 用户名 Password string `gorm:"column:password" json:"password"` // 密码 FollowCount int64 `gorm:"column:follow_count" json:"follow_count"` // 关注总数 FollowerCount int64 `gorm:"column:follower_count" json:"follower_count"` // 粉丝总数 CreatedAt time.Time `gorm:"column:created_at;default:CURRENT_TIMESTAMP" json:"created_at"` UpdatedAt time.Time `gorm:"column:updated_at;default:CURRENT_TIMESTAMP" json:"updated_at"` DeletedAt gorm.DeletedAt `gorm:"column:deleted_at" json:"deleted_at"` }
User mapped from table <users>
Click to show internal directories.
Click to hide internal directories.