123456789101112131415161718192021222324252627282930313233343536 |
- package models
- import (
- "eta_gn/eta_chart_lib/global"
- "time"
- )
- type TableInfo struct {
- TableInfoId int `gorm:"column:table_info_id;primaryKey" description:"表格ID" orm:"column(table_info_id);pk"`
- TableName string `gorm:"column:table_name" description:"表格名称"`
- UniqueCode string `gorm:"column:unique_code" description:"表格唯一编码"`
- TableClassifyId int `gorm:"column:table_classify_id" description:"表格分类ID"`
- SysUserId int `gorm:"column:sys_user_id" description:"操作人ID"`
- SysUserRealName string `gorm:"column:sys_user_real_name" description:"操作人真实姓名"`
- StartDate time.Time `gorm:"column:start_date" description:"开始日期"`
- EdbInfoIds string `gorm:"column:edb_info_ids" description:"指标ID"`
- TableType int `gorm:"column:table_type" description:"表格类型,1:指标+日期"`
- TableImage string `gorm:"column:table_image" description:"表格图片"`
- Sort int `gorm:"column:sort" description:"排序字段,数字越小越排前面"`
- EdbEndDate time.Time `gorm:"column:edb_end_date" description:"指标最后更新日期"`
- ModifyTime time.Time `gorm:"column:modify_time" description:"修改时间"`
- CreateTime time.Time `gorm:"column:create_time" description:"创建时间"`
- }
- func GetTableInfoByUniqueCode(uniqueCode string) (item *TableInfo, err error) {
- o := global.DmSQL["data"]
- sql := ` SELECT * FROM table_info WHERE unique_code=? `
- err = o.Raw(sql, uniqueCode).First(&item).Error
- return
- }
- type TableInfoDetailResp struct {
- TableInfo *TableInfo
- TableDataList []*TableData
- }
|