1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- package excel
- import (
- "github.com/beego/beego/v2/client/orm"
- "time"
- )
- type ExcelChartData struct {
- ExcelChartDataId int `orm:"column(excel_chart_data_id);pk"`
- ExcelInfoId int `description:"表格id"`
- ExcelChartEdbId int `description:"指标ID"`
- DataTime string
- Value float64
- ModifyTime time.Time `description:"修改时间"`
- CreateTime time.Time `description:"创建时间"`
- DataTimestamp int64
- }
- func (e *ExcelChartData) TableName() string {
- return "excel_chart_data"
- }
- // 新增
- func (e *ExcelChartData) Add() (err error) {
- o := orm.NewOrmUsingDB("data")
- _, err = o.Insert(e)
- return
- }
- // 修改
- func (e *ExcelChartData) Update(cols []string) (err error) {
- o := orm.NewOrmUsingDB("data")
- _, err = o.Update(e, cols...)
- return
- }
- // 删除
- func (e *ExcelChartData) Delete() (err error) {
- o := orm.NewOrmUsingDB("data")
- _, err = o.Delete(e)
- return
- }
- // 查询
|