23 lines
928 B
Go
23 lines
928 B
Go
package models
|
|
|
|
import "gorm.io/gorm"
|
|
|
|
// ActivityMessage 活动留言
|
|
type ActivityMessage struct {
|
|
ID int64 `json:"id" gorm:"primaryKey;autoIncrement"`
|
|
ActivityID int64 `json:"activity_id" gorm:"not null;index"`
|
|
UserID int64 `json:"user_id" gorm:"not null;index"`
|
|
StarID int64 `json:"star_id" gorm:"not null"`
|
|
Nickname string `json:"nickname" gorm:"size:50"`
|
|
AvatarURL string `json:"avatar_url" gorm:"size:500"`
|
|
Content string `json:"content" gorm:"type:varchar(500);not null"`
|
|
Status int16 `json:"status" gorm:"default:0"`
|
|
CreatedAt int64 `json:"created_at" gorm:"not null"`
|
|
UpdatedAt int64 `json:"updated_at" gorm:"not null"`
|
|
DeletedAt gorm.DeletedAt `json:"deleted_at,omitzero" gorm:"column:deleted_at;index"`
|
|
}
|
|
|
|
// TableName 表名
|
|
func (ActivityMessage) TableName() string {
|
|
return "activity_messages"
|
|
} |