package model

import (
	"time"
)

type SysPopup struct {
	Id             int       `json:"id" xorm:"not null pk autoincr INT(11)"`
	Uid            int       `json:"uid" xorm:"not null default 0 INT(11)"`
	Name           string    `json:"name" xorm:"not null default '' VARCHAR(32)"`
	ConditionType  string    `json:"condition_type" xorm:"not null default 'all' comment('展示人群类型;all:所有人;new_user:新用户;level:指定等级;tag:指定标签;no_order_user:未出单用户') VARCHAR(32)"`
	Condition      string    `json:"condition" xorm:"not null comment('弹窗条件,json') TEXT"`
	Position       string    `json:"position" xorm:"not null default 'index' comment('展示位置;index:首页') VARCHAR(64)"`
	Image          string    `json:"image" xorm:"not null default '' comment('弹窗图片') VARCHAR(128)"`
	Platform       string    `json:"platform" xorm:"not null default '' comment('弹窗图片') VARCHAR(255)"`
	Interval       int       `json:"interval" xorm:"not null default 0 comment('弹窗时间间隔;单位:分钟') INT(11)"`
	Skip           string    `json:"skip" xorm:"not null default '' comment('跳转标识') VARCHAR(255)"`
	Type           int       `json:"type" xorm:"not null default 1 comment('弹窗时间类型;1:固定时间;2:每天定时') TINYINT(1)"`
	PopupTime      string    `json:"popup_time" xorm:"comment('弹窗时间,json') TEXT"`
	State          int       `json:"state" xorm:"not null default 0 comment('状态;0:不启用;1:启用') TINYINT(1)"`
	Sort           int       `json:"sort" xorm:"not null default 0 comment('排序') INT(11)"`
	PopupType      int       `json:"popup_type" xorm:"not null default 0 comment('弹窗类型 0活动弹窗 1任务弹窗') INT(11)"`
	TaskType       int       `json:"task_type" xorm:"not null default 0 comment('任务类型') INT(11)"`
	TaskFinishType int       `json:"task_finish_type" xorm:"not null default 0 comment('任务完成状态') INT(11)"`
	CreateAt       time.Time `json:"create_at" xorm:"default 'CURRENT_TIMESTAMP' TIMESTAMP"`
	UpdateAt       time.Time `json:"update_at" xorm:"default 'CURRENT_TIMESTAMP' TIMESTAMP"`
	IsNotClose     int       `json:"is_not_close" xorm:"not null default 0 comment('不能关闭  0能关 1不能关') INT(1)"`
}