43 lines
1.3 KiB
Go
43 lines
1.3 KiB
Go
// Code generated by sql2gorm. DO NOT EDIT.
|
|
package repo
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/samber/do"
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
func init(){
|
|
do.Provide[RoleMenuPermissionRepo](nil,NewRoleMenuPermissionRepo)
|
|
}
|
|
|
|
|
|
// 角色菜单权限表
|
|
type RoleMenuPermission struct {
|
|
ID uint `gorm:"column:id;primary_key;AUTO_INCREMENT"` // id
|
|
MenuID uint `gorm:"column:menu_id;NOT NULL"` // 菜单id
|
|
RoleID uint `gorm:"column:role_id;NOT NULL"` // 角色id
|
|
CreatedBy string `gorm:"column:created_by"` // 创建人
|
|
CreatedOn time.Time `gorm:"column:created_on;default:CURRENT_TIMESTAMP;NOT NULL"` // 记录创建时间
|
|
ModifiedBy string `gorm:"column:modified_by"` // 修改人
|
|
ModifiedOn time.Time `gorm:"column:modified_on;default:CURRENT_TIMESTAMP"` // 记录修改时间
|
|
}
|
|
|
|
func (m *RoleMenuPermission) TableName() string {
|
|
return "role_menu_permission"
|
|
}
|
|
|
|
type RoleMenuPermissionRepo interface{
|
|
|
|
}
|
|
|
|
type roleMenuPermissionRepo struct{
|
|
db *gorm.DB
|
|
}
|
|
|
|
func NewRoleMenuPermissionRepo(i *do.Injector)(RoleMenuPermissionRepo,error){
|
|
return &roleMenuPermissionRepo{
|
|
db:do.MustInvoke[*gorm.DB](i),
|
|
},nil
|
|
} |