新增测点配置

This commit is contained in:
2024-09-03 15:52:38 +08:00
parent bfb284c4cc
commit 3b53e9f9b7
37 changed files with 429 additions and 66 deletions

20
model/point_name.go Normal file
View File

@@ -0,0 +1,20 @@
package model
import (
"energy-management-system/global"
"gorm.io/gorm"
"time"
)
// PointName 测点名称
type PointName struct {
Id int `gorm:"column:id;primaryKey" json:"id"`
Name string `gorm:"column:name;comment:测点名称" json:"name"`
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 *PointName) TableName() string {
return global.AppConf.Db.TablePrefix + "point_names"
}