fix(m_role_menu_entity): Add primary key constraint to RoleID and MenuID fields
This commit is contained in:
parent
1a16cb3396
commit
0543f8a1ff
|
|
@ -5,8 +5,8 @@ import (
|
|||
)
|
||||
|
||||
type M_Role_Menu struct {
|
||||
RoleID uuid.UUID `gorm:"type:uuid;not null;index" json:"role_id"`
|
||||
MenuID uuid.UUID `gorm:"type:uuid;not null;index" json:"menu_id"`
|
||||
RoleID uuid.UUID `gorm:"primaryKey;type:uuid;not null;index" json:"role_id"`
|
||||
MenuID uuid.UUID `gorm:"primaryKey;type:uuid;not null;index" json:"menu_id"`
|
||||
|
||||
Role M_Role `gorm:"foreignKey:RoleID;references:ID"`
|
||||
Menu M_Menu `gorm:"foreignKey:MenuID;references:ID"`
|
||||
|
|
|
|||
Loading…
Reference in New Issue