数据初始化完成

This commit is contained in:
SliverHorn
2020-08-25 16:34:45 +08:00
parent 6c9f8b5eba
commit cf73dbd0d9
18 changed files with 566 additions and 8 deletions

View File

@@ -15,3 +15,11 @@ type SysAuthority struct {
Children []SysAuthority `json:"children" gorm:"-"`
SysBaseMenus []SysBaseMenu `json:"menus" gorm:"many2many:sys_authority_menus;"`
}
func SysAuthorityData() []SysAuthority {
return []SysAuthority{
{CreatedAt: time.Now(), UpdatedAt: time.Now(), AuthorityId: "888", AuthorityName: "普通用户", ParentId: "0"},
{CreatedAt: time.Now(), UpdatedAt: time.Now(), AuthorityId: "8881", AuthorityName: "普通用户子角色", ParentId: "888"},
{CreatedAt: time.Now(), UpdatedAt: time.Now(), AuthorityId: "9528", AuthorityName: "测试角色", ParentId: "0"},
}
}