You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
	
	
		
			135 lines
		
	
	
		
			9.2 KiB
		
	
	
	
		
			Go
		
	
		
		
			
		
	
	
			135 lines
		
	
	
		
			9.2 KiB
		
	
	
	
		
			Go
		
	
| 
											5 months ago
										 | package Model | ||
|  | 
 | ||
|  | /** | ||
|  | 
 | ||
|  | * 议题及子议题类的描述 | ||
|  | 
 | ||
|  | * @author miSter | ||
|  | 
 | ||
|  | * @email  hdfs010@163.com | ||
|  | 
 | ||
|  | * @date   no data | ||
|  | 
 | ||
|  | * @link   <a href=http://www.philisense.com>北京飞利信电子技术有限公司</a>
 | ||
|  | 
 | ||
|  |  */ | ||
|  | import ( | ||
|  | 	"time" | ||
|  | 
 | ||
|  | 	"github.com/spf13/viper" | ||
|  | ) | ||
|  | 
 | ||
|  | const ( | ||
|  | 	TTopic_Id                 = "id"                 //议题id
 | ||
|  | 	TTopic_To_congressid      = "to_congressid"      //会议id
 | ||
|  | 	TTopic_To_agendaid        = "to_agendaid"        //议程id
 | ||
|  | 	TTopic_To_name            = "to_name"            //议题名称
 | ||
|  | 	TTopic_To_content         = "to_content"         //议题内容
 | ||
|  | 	TTopic_To_reporter        = "to_reporter"        //报告人
 | ||
|  | 	TTopic_To_type            = "to_type"            //议题类型
 | ||
|  | 	TTopic_To_votemethod      = "to_votemethod"      //表决方式 0 最后一次键盘有效的不公开表决1 第一次按键有效的不公开表决2最后一次键盘有效的公开表决3第一次按键有效的公开表决
 | ||
|  | 	TTopic_To_votebasenum     = "to_votebasenum"     //表决基数
 | ||
|  | 	TTopic_To_buttontype      = "to_buttontype"      //表决按键类型
 | ||
|  | 	TTopic_To_votespecies     = "to_votespecies"     //表决种类
 | ||
|  | 	TTopic_To_voteresult      = "to_voteresult"      //表决结果
 | ||
|  | 	TTopic_To_passrate        = "to_passrate"        //通过比例标准
 | ||
|  | 	TTopic_To_passbutton      = "to_passbutton"      //通过按键
 | ||
|  | 	TTopic_To_speakmode       = "to_speakmode"       //发言模式
 | ||
|  | 	TTopic_To_showmode        = "to_showmode"        //显示方式
 | ||
|  | 	TTopic_To_image           = "to_image"           //幻灯片文件
 | ||
|  | 	TTopic_To_shouldnum       = "to_shouldnum"       //应到人数
 | ||
|  | 	TTopic_To_actualnum       = "to_actualnum"       //实到人数
 | ||
|  | 	TTopic_To_buttononenum    = "to_buttononenum"    //按键1人数
 | ||
|  | 	TTopic_To_buttononename   = "to_buttononename"   //按键1名称
 | ||
|  | 	TTopic_To_buttontwonum    = "to_buttontwonum"    //按键2人数
 | ||
|  | 	TTopic_To_buttontwoname   = "to_buttontwoname"   //按键2名称
 | ||
|  | 	TTopic_To_buttonthreenum  = "to_buttonthreenum"  //按键3人数
 | ||
|  | 	TTopic_To_buttonthreename = "to_buttonthreename" //按键3名称
 | ||
|  | 	TTopic_To_buttonfournum   = "to_buttonfournum"   //按键4人数
 | ||
|  | 	TTopic_To_buttonfourname  = "to_buttonfourname"  //按键4名称
 | ||
|  | 	TTopic_To_buttonfivenum   = "to_buttonfivenum"   //按键5人数
 | ||
|  | 	TTopic_To_buttonfivename  = "to_buttonfivename"  //按键5名称
 | ||
|  | 	TTopic_To_buttonnotnum    = "to_buttonnotnum"    //未按人数
 | ||
|  | 	TTopic_To_topicstarttime  = "to_topicstarttime"  //议题计划开始时间
 | ||
|  | 	TTopic_To_topicendtime    = "to_topicendtime"    //议题计划结束时间
 | ||
|  | 	TTopic_To_votestarttime   = "to_votestarttime"   //表决开始时间
 | ||
|  | 	TTopic_To_voteendtime     = "to_voteendtime"     //表决结束时间
 | ||
|  | 	TTopic_To_speakstarttime  = "to_speakstarttime"  //发言开始时间
 | ||
|  | 	TTopic_To_speakendtime    = "to_speakendtime"    //发言结束时间
 | ||
|  | 	TTopic_To_reportstarttime = "to_reportstarttime" //报到开始时间
 | ||
|  | 	TTopic_To_reportendtime   = "to_reportendtime"   //报到结束时间
 | ||
|  | 	TTopic_To_num             = "to_num"             //序号
 | ||
|  | 	TTopic_To_createtime      = "to_createtime"      //创建时间
 | ||
|  | 	TTopic_To_updatetime      = "to_updatetime"      //修改时间
 | ||
|  | 	TTopic_To_remark          = "to_remark"          //备注
 | ||
|  | 	TTopic_To_parentguid      = "to_parentguid"      //父级id
 | ||
|  | 	TTopic_To_agendabgcolor   = "to_agendabgcolor"   //背景色
 | ||
|  | 	TTopic_To_agendahtml      = "to_agendahtml"      //议程html
 | ||
|  | 	TTopic_To_topiclower      = "to_topiclower"      //子议题
 | ||
|  | 	TTopic_To_status          = "to_status"          //议题的状态
 | ||
|  | 	TTopic_To_starttime       = "to_starttime"       //议题真正开始时间
 | ||
|  | 	TTopic_To_endtime         = "to_endtime"         //议题真正结束时间
 | ||
|  | ) | ||
|  | 
 | ||
|  | type TTopic struct { | ||
|  | 	Id                 string    `gorm:"column:id;primary_key" json:"id"`                     //议题id
 | ||
|  | 	To_congressid      string    `gorm:"column:to_congressid" json:"to_congressid"`           //会议id
 | ||
|  | 	To_agendaid        string    `gorm:"column:to_agendaid" json:"to_agendaid"`               //议程id
 | ||
|  | 	To_name            string    `gorm:"column:to_name" json:"to_name"`                       //议题名称
 | ||
|  | 	To_content         string    `gorm:"column:to_content" json:"to_content"`                 //议题内容
 | ||
|  | 	To_reporter        string    `gorm:"column:to_reporter" json:"to_reporter"`               //报告人
 | ||
|  | 	To_type            int64     `gorm:"column:to_type" json:"to_type"`                       //议题类型
 | ||
|  | 	To_votemethod      int64     `gorm:"column:to_votemethod" json:"to_votemethod"`           //表决方式 0 最后一次键盘有效的不公开表决1 第一次按键有效的不公开表决2最后一次键盘有效的公开表决3第一次按键有效的公开表决
 | ||
|  | 	To_votebasenum     int64     `gorm:"column:to_votebasenum" json:"to_votebasenum"`         //表决基数
 | ||
|  | 	To_buttontype      int64     `gorm:"column:to_buttontype" json:"to_buttontype"`           //表决按键类型
 | ||
|  | 	To_votespecies     int64     `gorm:"column:to_votespecies" json:"to_votespecies"`         //表决种类
 | ||
|  | 	To_voteresult      int64     `gorm:"column:to_voteresult" json:"to_voteresult"`           //表决结果
 | ||
|  | 	To_passrate        int64     `gorm:"column:to_passrate" json:"to_passrate"`               //通过比例标准
 | ||
|  | 	To_passbutton      int64     `gorm:"column:to_passbutton" json:"to_passbutton"`           //通过按键
 | ||
|  | 	To_speakmode       int64     `gorm:"column:to_speakmode" json:"to_speakmode"`             //发言模式
 | ||
|  | 	To_showmode        int64     `gorm:"column:to_showmode" json:"to_showmode"`               //显示方式
 | ||
|  | 	To_image           string    `gorm:"column:to_image" json:"to_image"`                     //幻灯片文件
 | ||
|  | 	To_shouldnum       int64     `gorm:"column:to_shouldnum" json:"to_shouldnum"`             //应到人数
 | ||
|  | 	To_actualnum       int64     `gorm:"column:to_actualnum" json:"to_actualnum"`             //实到人数
 | ||
|  | 	To_buttononenum    int64     `gorm:"column:to_buttononenum" json:"to_buttononenum"`       //按键1人数
 | ||
|  | 	To_buttononename   string    `gorm:"column:to_buttononename" json:"to_buttononename"`     //按键1名称
 | ||
|  | 	To_buttontwonum    int64     `gorm:"column:to_buttontwonum" json:"to_buttontwonum"`       //按键2人数
 | ||
|  | 	To_buttontwoname   string    `gorm:"column:to_buttontwoname" json:"to_buttontwoname"`     //按键2名称
 | ||
|  | 	To_buttonthreenum  int64     `gorm:"column:to_buttonthreenum" json:"to_buttonthreenum"`   //按键3人数
 | ||
|  | 	To_buttonthreename string    `gorm:"column:to_buttonthreename" json:"to_buttonthreename"` //按键3名称
 | ||
|  | 	To_buttonfournum   int64     `gorm:"column:to_buttonfournum" json:"to_buttonfournum"`     //按键4人数
 | ||
|  | 	To_buttonfourname  string    `gorm:"column:to_buttonfourname" json:"to_buttonfourname"`   //按键4名称
 | ||
|  | 	To_buttonfivenum   int64     `gorm:"column:to_buttonfivenum" json:"to_buttonfivenum"`     //按键5人数
 | ||
|  | 	To_buttonfivename  string    `gorm:"column:to_buttonfivename" json:"to_buttonfivename"`   //按键5名称
 | ||
|  | 	To_buttonnotnum    int64     `gorm:"column:to_buttonnotnum" json:"to_buttonnotnum"`       //未按人数
 | ||
|  | 	To_topicstarttime  time.Time `gorm:"column:to_topicstarttime" json:"to_topicstarttime"`   //议题计划开始时间
 | ||
|  | 	To_topicendtime    time.Time `gorm:"column:to_topicendtime" json:"to_topicendtime"`       //议题计划结束时间
 | ||
|  | 	To_votestarttime   time.Time `gorm:"column:to_votestarttime" json:"to_votestarttime"`     //表决开始时间
 | ||
|  | 	To_voteendtime     time.Time `gorm:"column:to_voteendtime" json:"to_voteendtime"`         //表决结束时间
 | ||
|  | 	To_speakstarttime  time.Time `gorm:"column:to_speakstarttime" json:"to_speakstarttime"`   //发言开始时间
 | ||
|  | 	To_speakendtime    time.Time `gorm:"column:to_speakendtime" json:"to_speakendtime"`       //发言结束时间
 | ||
|  | 	To_reportstarttime time.Time `gorm:"column:to_reportstarttime" json:"to_reportstarttime"` //报到开始时间
 | ||
|  | 	To_reportendtime   time.Time `gorm:"column:to_reportendtime" json:"to_reportendtime"`     //报到结束时间
 | ||
|  | 	To_num             int64     `gorm:"column:to_num" json:"to_num"`                         //序号
 | ||
|  | 	To_createtime      time.Time `gorm:"column:to_createtime" json:"to_createtime"`           //创建时间
 | ||
|  | 	To_updatetime      time.Time `gorm:"column:to_updatetime" json:"to_updatetime"`           //修改时间
 | ||
|  | 	To_remark          string    `gorm:"column:to_remark" json:"to_remark"`                   //备注
 | ||
|  | 	To_parentguid      string    `gorm:"column:to_parentguid" json:"to_parentguid"`           //父级id
 | ||
|  | 	To_agendabgcolor   string    `gorm:"column:to_agendabgcolor" json:"to_agendabgcolor"`     //背景色
 | ||
|  | 	To_agendahtml      string    `gorm:"column:to_agendahtml" json:"to_agendahtml"`           //议程html
 | ||
|  | 	To_topiclower      int64     `gorm:"column:to_topiclower" json:"to_topiclower"`           //子议题
 | ||
|  | 	To_status          int64     `gorm:"column:to_status" json:"to_status"` | ||
|  | 	To_voteresult_CH   string    `gorm:"column:to_voteresult_ch" json:"to_voteresult_ch"` | ||
|  | 	To_starttime       time.Time `gorm:"column:to_starttime" json:"to_starttime"` //议题真正开始时间
 | ||
|  | 	To_endtime         time.Time `gorm:"column:to_endtime" json:"to_endtime"`     //议题真正结束时间
 | ||
|  | 	// AllTopicFile       []TCongressfile
 | ||
|  | } | ||
|  | 
 | ||
|  | func (TTopic) TableName() string { | ||
|  | 	tableName := "t_topic" | ||
|  | 	if viper.GetString("database.dbtype") == "kingbase" || viper.GetString("database.dbtype") == "postgres" { | ||
|  | 		return viper.GetString("database.dbnames") + "." + tableName | ||
|  | 	} | ||
|  | 	return tableName | ||
|  | } |