This commit is contained in:
2025-06-20 17:13:51 +08:00
parent 1b55403cd6
commit fd0345a034
472 changed files with 52560 additions and 77 deletions

View File

@@ -0,0 +1,30 @@
package model
import "github.com/cool-team-official/cool-admin-go/cool"
const TableNameBaseSysDepartment = "base_sys_department"
// BaseSysDepartment mapped from table <base_sys_department>
type BaseSysDepartment struct {
*cool.Model
Name string `gorm:"column:name;type:varchar(255);not null" json:"name"` // 部门名称
ParentID uint `gorm:"column:parentId;type:bigint" json:"parentId"` // 上级部门ID
OrderNum int32 `gorm:"column:orderNum;type:int;not null" json:"orderNum"` // 排序
}
// TableName BaseSysDepartment's table name
func (*BaseSysDepartment) TableName() string {
return TableNameBaseSysDepartment
}
// NewBaseSysDepartment 创建一个BaseSysDepartment实例
func NewBaseSysDepartment() *BaseSysDepartment {
return &BaseSysDepartment{
Model: cool.NewModel(),
}
}
// init 创建表
func init() {
cool.CreateTable(&BaseSysDepartment{})
}