Files
junhong_cmp_fiber/internal/model/role_permission.go
huang 4507de577b 代码质量改进:修复架构违规、完善文档注释和清理冗余代码
- 修复 health.go handler 直接操作响应的架构违规问题
- 为 model 字段添加 GORM comment 标签(account_role、base、role_permission)
- 为 handler、service、store 包添加包级文档注释
- 清理 customer service 和 personal_customer handler 中注释掉的代码

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-12 16:28:48 +08:00

21 lines
659 B
Go

package model
import (
"gorm.io/gorm"
)
// RolePermission 角色-权限关联模型
type RolePermission struct {
gorm.Model
BaseModel `gorm:"embedded"`
RoleID uint `gorm:"column:role_id;not null;index;uniqueIndex:idx_role_permission_unique,where:deleted_at IS NULL;comment:角色ID" json:"role_id"`
PermID uint `gorm:"column:perm_id;not null;index;uniqueIndex:idx_role_permission_unique,where:deleted_at IS NULL;comment:权限ID" json:"perm_id"`
Status int `gorm:"column:status;not null;default:1;comment:状态 0=禁用 1=启用" json:"status"`
}
// TableName 指定表名
func (RolePermission) TableName() string {
return "tb_role_permission"
}