github.com/easysoft/zendata@v0.0.0-20240513203326-705bd5a7fd67/internal/server/model/zd-config.go (about) 1 package model 2 3 import ( 4 consts "github.com/easysoft/zendata/internal/pkg/const" 5 ) 6 7 type ZdConfig struct { 8 BaseModel 9 10 Title string `json:"title"` 11 Desc string `json:"desc"` 12 13 Range string `json:"range"` 14 Prefix string `json:"prefix"` 15 Postfix string `json:"postfix"` 16 Loop string `json:"loop"` 17 Loopfix string `json:"loopfix"` 18 Format string `json:"format"` 19 20 Yaml string `json:"yaml"` 21 Path string `json:"path" yaml:"-"` 22 Folder string `json:"folder" yaml:"-"` 23 FileName string `json:"fileName" yaml:"-"` 24 ReferName string `json:"referName" yaml:"-"` 25 26 // for range edit 27 IsRange bool `gorm:"default:true" json:"isRange" yaml:"-"` 28 Sections []ZdSection `gorm:"ForeignKey:ownerID" json:"sections" yaml:"-"` 29 } 30 31 func (*ZdConfig) TableName() string { 32 return consts.TablePrefix + "config" 33 }