componentList.go 456 B

1234567891011121314
  1. package model
  2. import "gorm.io/gorm"
  3. type ComponentList struct {
  4. gorm.Model
  5. Name string `gorm:"type:varchar(255);not null;unique;comment:组件名称" json:"name" validate:"required"`
  6. Image string `gorm:"type:varchar(255);not null;comment:组件图片" json:"image" validate:"required"`
  7. Data string `gorm:"type:longtext;comment:组件数据" json:"data" validate:"required"`
  8. }
  9. func (c ComponentList) TableName() string {
  10. return "component_list"
  11. }