互动
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
1.1 KiB

5 years ago
  1. package models
  2. import (
  3. "time"
  4. "github.com/ouxuanserver/osmanthuswine/src/core"
  5. )
  6. type MsgWallServer struct {
  7. Id int64 `json:"id" xorm:"pk autoincr"`
  8. ActivityId int64 `json:"activity_id" xorm:"not null comment('主活动id')"`
  9. MsgWallBgUrl string `json:"msg_wall_bg_url" xorm:"not null comment('消息墙背景url')"`
  10. MsgWallBgStatus string `json:"msg_wall_bg_status" xorm:"not null default('关闭') comment('自定义消息墙背景开关[开启|关闭]')"`
  11. UpWallStatus string `json:"up_wall_status" xorm:"not null default('关闭') comment('消息上墙开关[开启|关闭]')"`
  12. MsgTrailStatus string `json:"msg_trail_status" xorm:"not null default('关闭') comment('消息审核开关[开启|关闭]')"`
  13. IsDelete bool `json:"is_delete" xorm:"default('0') comment('删除')"`
  14. CreatedAt time.Time `json:"created_at" xorm:"created comment('创建')"`
  15. UpdatedAt time.Time `json:"updated_at" xorm:"updated comment('更新')"`
  16. }
  17. func (t *MsgWallServer) GetByActivityId(aid int64) (bool, error) {
  18. return core.GetXormAuto().Where("is_delete=0 and activity_id=?", aid).Get(t)
  19. }