🎨 update

This commit is contained in:
2024-11-27 21:13:46 +08:00
parent 0b22d9800c
commit 44de572f1b
10 changed files with 714 additions and 30 deletions

19
model/sca_user_follows.go Normal file
View File

@@ -0,0 +1,19 @@
package model
import (
"time"
)
// ScaUserFollows 用户关注表
type ScaUserFollows struct {
FollowerId string `gorm:"column:follower_id;type:varchar(20);primary_key;comment:关注者" json:"follower_id"`
FolloweeId string `gorm:"column:followee_id;type:varchar(20);comment:被关注者;NOT NULL" json:"followee_id"`
Status int `gorm:"column:status;type:tinyint(1);default:0;comment:关注状态0 未互关 1 互关)" json:"status"`
CreatedTime *time.Time `gorm:"column:created_time;type:datetime;default:CURRENT_TIMESTAMP;comment:创建时间" json:"created_time"`
UpdateTime *time.Time `gorm:"column:update_time;type:datetime;default:CURRENT_TIMESTAMP;comment:更新时间" json:"update_time"`
}
// TableName ScaUserFollows 表名
func (ScaUserFollows) TableName() string {
return "sca_user_follows"
}

23
model/sca_user_level.go Normal file
View File

@@ -0,0 +1,23 @@
package model
import (
"time"
)
// ScaUserLevel 用户等级表
type ScaUserLevel struct {
Id int64 `gorm:"column:id;type:bigint(20);primary_key;comment:主键" json:"id"`
UserId string `gorm:"column:user_id;type:varchar(20);comment:用户Id" json:"user_id"`
LevelType int `gorm:"column:level_type;type:tinyint(1);comment:等级类型" json:"level_type"`
Level int `gorm:"column:level;type:int(11);comment:等级" json:"level"`
LevelName string `gorm:"column:level_name;type:varchar(50);comment:等级名称" json:"level_name"`
ExpStart int64 `gorm:"column:exp_start;type:bigint(20);comment:开始经验值" json:"exp_start"`
ExpEnd int64 `gorm:"column:exp_end;type:bigint(20);comment:结束经验值" json:"exp_end"`
LevelDescription string `gorm:"column:level_description;type:text;comment:等级描述" json:"level_description"`
CreatedTime *time.Time `gorm:"column:created_time;type:datetime;default:CURRENT_TIMESTAMP;comment:创建时间" json:"created_time"`
UpdateTime *time.Time `gorm:"column:update_time;type:datetime;default:CURRENT_TIMESTAMP;comment:更新时间" json:"update_time"`
}
func (m *ScaUserLevel) TableName() string {
return "sca_user_level"
}