添加callback,迁移文件

This commit is contained in:
2025-12-15 14:37:34 +08:00
parent ad946af5ee
commit 478e37903b
16 changed files with 52 additions and 367 deletions

View File

@@ -7,7 +7,7 @@ import (
// Role 角色模型
type Role struct {
gorm.Model
BaseModel
BaseModel `gorm:"embedded"`
RoleName string `gorm:"not null;size:50" json:"role_name"`
RoleDesc string `gorm:"size:255" json:"role_desc"`