You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
1.5 KiB
24 lines
1.5 KiB
package entities
|
|
|
|
import (
|
|
"gorm.io/gorm"
|
|
"sorbet/pkg/db"
|
|
"time"
|
|
)
|
|
|
|
// Config 配置表
|
|
type Config struct {
|
|
ID uint `json:"id" xml:"id" gorm:"primaryKey;not null;comment:配置编号"`
|
|
GroupID uint `json:"group_id" xml:"group_id" gorm:"comment:所属配置组编号"`
|
|
Name string `json:"name" xml:"name" gorm:"size:30;not null;comment:配置名称"`
|
|
Title string `json:"title" xml:"title" gorm:"size:50;not null;comment:配置标题"`
|
|
Description string `json:"description" xml:"description" gorm:"size:100;not null;comment:配置描述"`
|
|
DataType string `json:"data_type" xml:"data_type" gorm:"size:10;not null;comment:数据类型"`
|
|
Attributes map[string]any `json:"attributes" xml:"attributes" gorm:"serializer:json;comment:相关属性值"`
|
|
Value any `json:"value" xml:"value" gorm:"serializer:json;not null;comment:配置值"`
|
|
Sort int32 `json:"sort" xml:"sort" gorm:"size:4;default:0;comment:排序"`
|
|
Version db.Version `json:"-" xml:"-" gorm:"comment:乐观锁"`
|
|
CreatedAt time.Time `json:"create_time" xml:"create_time" gorm:"<-:false;comment:创建时间"`
|
|
UpdatedAt time.Time `json:"update_time" xml:"update_time" gorm:"<-:false;comment:更新时间"`
|
|
DeletedAt gorm.DeletedAt `json:"-" xml:"-" gorm:"comment:删除时间"`
|
|
}
|
|
|