package model

import (
	"time"
)

type SysModule struct {
	ModId          int       `json:"mod_id" xorm:"not null pk autoincr INT(10)"`
	ModPid         int       `json:"mod_pid" xorm:"not null default 0 comment('父级模块ID') INT(10)"`
	TemplateId     int       `json:"template_id" xorm:"not null default 0 comment('模板ID') INT(11)"`
	ModName        string    `json:"mod_name" xorm:"not null default '' comment('模块名称') VARCHAR(250)"`
	Position       string    `json:"position" xorm:"not null default '' comment('位置') VARCHAR(250)"`
	SkipIdentifier string    `json:"skip_identifier" xorm:"not null default '' comment('跳转标识') VARCHAR(250)"`
	Title          string    `json:"title" xorm:"not null default '' comment('标题') VARCHAR(128)"`
	Subtitle       string    `json:"subtitle" xorm:"not null default '' comment('副标题') VARCHAR(255)"`
	Url            string    `json:"url" xorm:"not null default '' comment('跳转链接') VARCHAR(512)"`
	Margin         string    `json:"margin" xorm:"not null default '0,0,0,0' comment('边距,上右下左') VARCHAR(64)"`
	AspectRatio    string    `json:"aspect_ratio" xorm:"not null default 0.00 comment('宽高比,宽/高保留两位小数') DECIMAL(4,2)"`
	Icon           string    `json:"icon" xorm:"not null default '' comment('图标') VARCHAR(512)"`
	Img            string    `json:"img" xorm:"not null default '' comment('图片') VARCHAR(512)"`
	FontColor      string    `json:"font_color" xorm:"not null default '' comment('文字颜色') VARCHAR(128)"`
	BgImg          string    `json:"bg_img" xorm:"not null default '' comment('背景图片') VARCHAR(512)"`
	BgColor        string    `json:"bg_color" xorm:"not null default '' comment('背景颜色') VARCHAR(512)"`
	BgColorT       string    `json:"bg_color_t" xorm:"not null default '' comment('背景颜色过度') VARCHAR(255)"`
	Badge          string    `json:"badge" xorm:"not null default '' comment('badge图片') VARCHAR(512)"`
	Path           string    `json:"path" xorm:"not null default '' comment('跳转路径') VARCHAR(255)"`
	Data           string    `json:"data" xorm:"comment('内容') TEXT"`
	Sort           int       `json:"sort" xorm:"not null default 0 comment('排序') INT(11)"`
	Uid            int       `json:"uid" xorm:"not null default 0 comment('排序') INT(11)"`
	State          int       `json:"state" xorm:"not null default 1 comment('0不显示,1显示') TINYINT(1)"`
	IsGlobal       int       `json:"is_global" xorm:"not null default 0 comment('是否全局显示') TINYINT(1)"`
	Platform       int       `json:"platform" xorm:"not null default 1 comment('平台;1:全平台;2:App应用(ios和android);3:H5(wap);4:微信小程序;5:抖音小程序;6:百度小程序') TINYINT(1)"`
	CreateAt       time.Time `json:"create_at" xorm:"not null default CURRENT_TIMESTAMP comment('创建时间') TIMESTAMP"`
	UpdateAt       time.Time `json:"update_at" xorm:"not null default CURRENT_TIMESTAMP comment('更新时间') TIMESTAMP"`
}