This commit is contained in:
2026-07-18 10:52:32 +08:00
parent 2dcafae465
commit b5ef58f434
61 changed files with 1274 additions and 2142 deletions

View File

@@ -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=顶级