package bi_dashboard import ( "eta_gn/eta_api/global" "time" ) type BiDashboardHomePage struct { BiDashboardHomePageId int `gorm:"primaryKey;autoIncrement;comment:'bi首页看板id'"` BiDashboardId int `gorm:"type:int(10);default:null;comment:'看板id'"` AdminId int `gorm:"type:int(10);default:null;comment:'1图表 2表格'"` CreateTime time.Time `gorm:"type:datetime;comment:'创建时间'"` ModifyTime time.Time `gorm:"type:datetime;comment:'更新时间'"` FromType int `gorm:"type:int(10);default:null;comment:'来源,前端跳转用 1我的 2共享 3公共"` } // tableName func (m *BiDashboardHomePage) TableName() string { return "bi_dashboard_home_page" } // get func GetBiDashboardHomePageById(id int) (item *BiDashboardHomePage, err error) { err = global.DEFAULT_DmSQL.Where("admin_id = ?", id).First(&item).Error return } // save func SaveBiDashboardHomePage(item *BiDashboardHomePage) (err error) { return global.DEFAULT_DmSQL.Save(item).Error } type SaveHomePageReq struct { BiDashboardId int `description:"看板id"` FromType int `description:"来源,前端跳转用 1我的 2共享 3公共"` }