1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- package models
-
- // 表
- type Activity struct {
- Id int64 `gorm:"column:id" json:"id"` // 活动 ID
- Title string `json:"title"` // 活动标题
- Subtitle string `json:"subtitle"` // 活动副标题
- CityId int `gorm:"column:city_id" json:"city_id"` // 活动地点 ID
- Address string `json:"address"` // 活动详细地址
- Lng string `gorm:"column:longitude" json:"lng"` // 活动位置的经度
- Lat string `gorm:"column:latitude" json:"lat"` // 活动位置的纬度
- SignUpDeadline int64 `gorm:"column:sign_up_deadline" json:"sign_up_deadline"` // 报名截止时间戳
- SignUpNotice string `gorm:"column:sign_up_notice" json:"sign_up_notice"` // 报名须知
- StartTime int64 `gorm:"column:start_time" json:"start_time"` // 活动开始时间戳
- PosterPhoto string `gorm:"column:poster_photo" json:"poster_photo"` // 活动海报
- PosterPhotoThumb string `gorm:"column:poster_photo_thumb" json:"poster_photo_thumb"` // 活动海报缩略图
- LimitNum int `gorm:"column:limit_num;" json:"limit_num"` // 限制报名人数,0表示无限制
- JoinNum int `gorm:"column:join_num" json:"join_num"` // 已报名人数
- PhoneNumber string `gorm:"column:phone_number" json:"phone_number"` // 联系方式
- Type int8 `json:"type"` // 活动形式
- IsInsurance int8 `gorm:"column:is_insurance;" json:"is_insurance"` // 是否提供保险:报名不需要保险0:否;报名需要保险1:是;2不需要报名
- Status int `json:"status"` // 活动状态 1:已发布 2:待审核 3:未通过 4:草稿 9:已删除
- Reason string `json:"reason"` // 审核原因
- IsRecommend int8 `gorm:"column:is_recommend;" json:"is_recommend"` // 0:未推荐;1:已推荐
- CreateTime int64 `gorm:"column:ctime" json:"-"` // 创建时间
- ModifyTime int64 `gorm:"column:mtime" json:"-"` // 修改时间
- UserOrgId int64 `gorm:"column:user_org_id" json:"-"` // 所属发布机构 ID
- UserAppId int64 `gorm:"column:user_app_id" json:"-"` // 所属发布应用 ID
- CommentNum int `gorm:"column:comment_num;" json:"comment_num"` // 评论数
- StarNum int `gorm:"column:star_num" json:"star_num"` // 点赞书
- ReadNum int `gorm:"column:read_num;" json:"read_num"` // 阅读数
- }
-
- func (Activity) TableName() string {
- return "sgj_patient_activity"
- }
-
- type ActivityParagraph struct {
- Id int64 `gorm:"PRIMARY_KEY;AUTO_INCREMENT" json:"id"` // 记录 ID
- ActivityId int64 `gorm:"column:activity_id" json:"activity_id"` // 活动 ID
- Title string `json:"title"`
- Text string `json:"text"`
- // Image string `json:"image"` // 该字段实际上已经没用了
- Status int8 `json:"-"` // 状态 0.无效 1.有效
- CreateTime int64 `gorm:"column:ctime" json:"-"` // 创建时间
- ModifyTime int64 `gorm:"column:mtime" json:"-"` // 修改时间
- }
-
- func (ActivityParagraph) TableName() string {
- return "sgj_patient_activity_paragraph"
- }
-
- type ActivityUser struct {
- Id int `gorm:"PRIMARY_KEY;AUTO_INCREMENT" json:"id"` // 记录 ID
- ActivityId int `gorm:"column:activity_id" json:"-"` // 活动 ID
- UserId int `gorm:"column:user_id" json:"-"` // 参与者 ID
- IDCardNo string `gorm:"column:idcard_no" json:"idcard_no"` // 身份证号
- Mobile string `json:"mobile"`
- Realname string `json:"real_name"`
- Avatar string `json:"avatar"`
- AvatarThumb string `json:"avatar_thumb"`
- Status int8 `json:"-"` // 状态 0.无效 1.有效
- CreateTime int64 `gorm:"column:ctime" json:"ctime"` // 报名时间
- ModifyTime int64 `gorm:"column:mtime" json:"-"` // 修改时间
- }
-
- func (ActivityUser) TableName() string {
- return "sgj_patient_activity_user"
- }
-
- type ActivityWxShare struct {
- Id int `gorm:"PRIMARY_KEY;AUTO_INCREMENT"` // 记录 ID
- ActivityId int `gorm:"column:activity_id"` // 活动 ID
- Title string
- Subtitle string
- Image string
- Status int8 // 状态 0.无效 1.有效
- CreateTime int64 `gorm:"column:ctime"` // 创建时间
- ModifyTime int64 `gorm:"column:mtime"` // 修改时间
- ShortURL string `gorm:"column:short_url"` // 短链接
- }
-
- func (ActivityWxShare) TableName() string {
- return "sgj_patient_activity_wx_share"
- }
|