提交
This commit is contained in:
@@ -5,7 +5,7 @@ import "time"
|
||||
// Department 部门/组织架构模型
|
||||
// 使用物化路径实现树形结构
|
||||
type Department struct {
|
||||
ID uint64 `json:"id" gorm:"primaryKey;autoIncrement"`
|
||||
ID uint64 `json:"id" gorm:"primaryKey"`
|
||||
Name string `json:"name" gorm:"size:128;not null"` // 部门名称
|
||||
Code string `json:"code" gorm:"uniqueIndex;size:64"` // 部门编码
|
||||
ParentID uint64 `json:"parent_id" gorm:"index;default:0"` // 上级部门ID, 0=顶级
|
||||
|
||||
Reference in New Issue
Block a user