package models import "gorm.io/gorm" type Department struct { ID string `json:"id" gorm:"primaryKey;size:20" comment:"ID" scenarios:"view;export"` CreatedAt int64 `json:"created_at" gorm:"autoCreateTime" comment:"创建时间" scenarios:"list;view;export"` UpdatedAt int64 `json:"updated_at" gorm:"autoUpdateTime" comment:"更新时间" scenarios:"list;view;export"` DeletedAt gorm.DeletedAt `json:"deleted_at" gorm:"index" comment:"删除时间"` Parent string `json:"parent" gorm:"index;size:20;not null;default:''" props:"match:exactly" comment:"归属" format:"department" scenarios:"search;list;create;update;view;export" live:"type:dropdown;url:/organize/department-types" position:"3"` Name string `json:"name" gorm:"size:60;not null;default:''" rule:"required" comment:"名称" scenarios:"search;list;create;update;view;export" position:"2"` Description string `json:"description" gorm:"size:500;not null;default:''" format:"textarea" comment:"备注" scenarios:"create;update;view;export"` Position int `json:"position" gorm:"not null;default:0" comment:"排序" scenarios:""` } func (model *Department) TableName() string { return "departments" }