config_file.go 520 B

12345678910111213141516171819202122
  1. package model
  2. import "gorm.io/gorm"
  3. type ConfigFileModel struct {
  4. gorm.Model
  5. Name string `gorm:"type:varchar(64)"`
  6. Format string `gorm:"type:varchar(32)"`
  7. DefaultPath string `gorm:"type:varchar(256)"`
  8. Desc string `gorm:"type:varchar(256)"`
  9. // belong to app: 一定属于一个App
  10. AppModelID uint
  11. AppModel AppModel
  12. ApolloAppID string `gorm:"apollo_app_id"`
  13. ApolloNamespace string `gorm:"type:varchar(64)"`
  14. }
  15. func (c *ConfigFileModel) TableName() string {
  16. return "cc_configfile"
  17. }