add: 提交部分表设计
update: 1.所有model嵌入gorm公用model 2.所有model嵌入BaseModel
This commit is contained in:
@@ -155,8 +155,6 @@ func TestPermissionAPI_Create(t *testing.T) {
|
||||
PermCode: "existing:perm",
|
||||
PermType: constants.PermissionTypeMenu,
|
||||
Status: constants.StatusEnabled,
|
||||
Creator: 1,
|
||||
Updater: 1,
|
||||
}
|
||||
env.db.Create(existingPerm)
|
||||
|
||||
@@ -187,8 +185,6 @@ func TestPermissionAPI_Create(t *testing.T) {
|
||||
PermCode: "system:manage",
|
||||
PermType: constants.PermissionTypeMenu,
|
||||
Status: constants.StatusEnabled,
|
||||
Creator: 1,
|
||||
Updater: 1,
|
||||
}
|
||||
env.db.Create(parentPerm)
|
||||
|
||||
@@ -235,8 +231,6 @@ func TestPermissionAPI_Get(t *testing.T) {
|
||||
PermCode: "get:test:perm",
|
||||
PermType: constants.PermissionTypeMenu,
|
||||
Status: constants.StatusEnabled,
|
||||
Creator: 1,
|
||||
Updater: 1,
|
||||
}
|
||||
env.db.Create(testPerm)
|
||||
|
||||
@@ -283,8 +277,6 @@ func TestPermissionAPI_Update(t *testing.T) {
|
||||
PermCode: "update:test:perm",
|
||||
PermType: constants.PermissionTypeMenu,
|
||||
Status: constants.StatusEnabled,
|
||||
Creator: 1,
|
||||
Updater: 1,
|
||||
}
|
||||
env.db.Create(testPerm)
|
||||
|
||||
@@ -329,8 +321,6 @@ func TestPermissionAPI_Delete(t *testing.T) {
|
||||
PermCode: "delete:test:perm",
|
||||
PermType: constants.PermissionTypeMenu,
|
||||
Status: constants.StatusEnabled,
|
||||
Creator: 1,
|
||||
Updater: 1,
|
||||
}
|
||||
env.db.Create(testPerm)
|
||||
|
||||
@@ -367,8 +357,6 @@ func TestPermissionAPI_List(t *testing.T) {
|
||||
PermCode: fmt.Sprintf("list:test:perm:%d", i),
|
||||
PermType: constants.PermissionTypeMenu,
|
||||
Status: constants.StatusEnabled,
|
||||
Creator: 1,
|
||||
Updater: 1,
|
||||
}
|
||||
env.db.Create(perm)
|
||||
}
|
||||
@@ -413,8 +401,6 @@ func TestPermissionAPI_GetTree(t *testing.T) {
|
||||
PermCode: "system",
|
||||
PermType: constants.PermissionTypeMenu,
|
||||
Status: constants.StatusEnabled,
|
||||
Creator: 1,
|
||||
Updater: 1,
|
||||
}
|
||||
env.db.Create(rootPerm)
|
||||
|
||||
@@ -425,8 +411,6 @@ func TestPermissionAPI_GetTree(t *testing.T) {
|
||||
PermType: constants.PermissionTypeMenu,
|
||||
ParentID: &rootPerm.ID,
|
||||
Status: constants.StatusEnabled,
|
||||
Creator: 1,
|
||||
Updater: 1,
|
||||
}
|
||||
env.db.Create(childPerm)
|
||||
|
||||
@@ -437,8 +421,6 @@ func TestPermissionAPI_GetTree(t *testing.T) {
|
||||
PermType: constants.PermissionTypeButton,
|
||||
ParentID: &childPerm.ID,
|
||||
Status: constants.StatusEnabled,
|
||||
Creator: 1,
|
||||
Updater: 1,
|
||||
}
|
||||
env.db.Create(grandchildPerm)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user