feat: 优化web

This commit is contained in:
2026-04-23 18:58:13 +08:00
commit 544a2f3428
160 changed files with 27327 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
package entity
import (
"time"
"gorm.io/gorm"
)
// Dept 部门 iam_dept(根部门 parent_id 为空字符串)
type Dept struct {
ID string `json:"id" gorm:"primaryKey;type:varchar(36);not null"`
TenantID string `json:"tenant_id" gorm:"size:36;not null;index:idx_dept_tenant"`
ParentID string `json:"parent_id" gorm:"size:36;default:'';index:idx_dept_parent"`
DeptName string `json:"dept_name" gorm:"size:128;not null"`
DeptPath string `json:"dept_path" gorm:"type:text"`
LeaderID *string `json:"leader_id" gorm:"size:36"`
SortOrder int `json:"sort_order" gorm:"default:0"`
Status int16 `json:"status" gorm:"default:1"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt gorm.DeletedAt `json:"-" gorm:"index"`
}
func (Dept) TableName() string { return "iam_dept" }