24 lines
852 B
Go
24 lines
852 B
Go
package model
|
|
|
|
import (
|
|
"DT/global"
|
|
"gorm.io/gorm"
|
|
"time"
|
|
)
|
|
|
|
type DevUpData struct {
|
|
Id int `gorm:"column:id;primaryKey" json:"id"`
|
|
Imei string `gorm:"column:imei;unique;comment:IMEI;type:varchar(255)" json:"imei"`
|
|
Sum string `gorm:"column:sum;comment:总次数;type:varchar(255)" json:"sum"`
|
|
Time string `gorm:"column:time;comment:总运行时间;type:varchar(255)" json:"time"`
|
|
Mile string `gorm:"column:mile;comment:总里程;type:varchar(255)" json:"mile"`
|
|
|
|
Created time.Time `gorm:"column:created;autoCreateTime;comment:创建时间" json:"created"`
|
|
Updated time.Time `gorm:"column:updated;autoUpdateTime;comment:修改时间" json:"updated"`
|
|
DeletedAt gorm.DeletedAt `gorm:"index;comment:删除时间" json:"-"`
|
|
}
|
|
|
|
func (r *DevUpData) TableName() string {
|
|
return global.AppConf.Db.TablePrefix + "dev_up_data"
|
|
}
|