实现角色接口增删改查
This commit is contained in:
@ -21,6 +21,7 @@ type AdminsDao struct {
|
||||
// AdminsColumns defines and stores column names for the table admins.
|
||||
type AdminsColumns struct {
|
||||
Id string // 管理员ID
|
||||
RoleId string // 角色ID
|
||||
Username string // 管理员用户名
|
||||
PasswordHash string // 密码哈希
|
||||
RealName string // 真实姓名
|
||||
@ -35,6 +36,7 @@ type AdminsColumns struct {
|
||||
// adminsColumns holds the columns for the table admins.
|
||||
var adminsColumns = AdminsColumns{
|
||||
Id: "id",
|
||||
RoleId: "role_id",
|
||||
Username: "username",
|
||||
PasswordHash: "password_hash",
|
||||
RealName: "real_name",
|
||||
|
||||
@ -28,6 +28,7 @@ type RolesColumns struct {
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
DeletedAt string // 软删除时间戳
|
||||
IsDeletable string // 是否可删除:0=不可删除,1=可删除
|
||||
}
|
||||
|
||||
// rolesColumns holds the columns for the table roles.
|
||||
@ -40,6 +41,7 @@ var rolesColumns = RolesColumns{
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
DeletedAt: "deleted_at",
|
||||
IsDeletable: "is_deletable",
|
||||
}
|
||||
|
||||
// NewRolesDao creates and returns a new DAO object for table data access.
|
||||
|
||||
@ -35,6 +35,7 @@ type UsersColumns struct {
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 更新时间
|
||||
DeletedAt string // 软删除时间
|
||||
RoleId string // 角色ID
|
||||
}
|
||||
|
||||
// usersColumns holds the columns for the table users.
|
||||
@ -54,6 +55,7 @@ var usersColumns = UsersColumns{
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
DeletedAt: "deleted_at",
|
||||
RoleId: "role_id",
|
||||
}
|
||||
|
||||
// NewUsersDao creates and returns a new DAO object for table data access.
|
||||
|
||||
Reference in New Issue
Block a user