admin add edit status password items info
This commit is contained in:
+10
-12
@@ -44,22 +44,20 @@ type AdminStatus struct {
|
||||
|
||||
// AdminInfo 管理员详情
|
||||
type AdminInfo struct {
|
||||
Id int `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT;comment:ID" json:"id"`
|
||||
Avatar string `gorm:"column:avatar;type:varchar(255);comment:头像" json:"avatar"`
|
||||
Name string `gorm:"column:name;type:varchar(30);comment:真实姓名;NOT NULL" json:"name"`
|
||||
Phone string `gorm:"column:phone;type:char(12);comment:电话" json:"phone"`
|
||||
Status uint8 `gorm:"column:status;type:tinyint(1);default:1;comment:状态,1为正常,2为禁用;NOT NULL" json:"status"`
|
||||
DepartmentId string `gorm:"column:department_id;type:varchar(255);default:0;comment:部门ID" json:"department_id"`
|
||||
Email string `gorm:"column:email;type:varchar(255);comment:邮箱" json:"email"`
|
||||
Roles string `gorm:"column:roles;type:varchar(255);comment:角色" json:"roles"`
|
||||
LastTime utils.CustomTime `gorm:"column:last_time;type:datetime;comment:最后一次登录时间" json:"last_time"`
|
||||
FailNumber int `gorm:"column:fail_number;type:tinyint(2);default:0;comment:连续登录失败次数" json:"fail_number"`
|
||||
Id int `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT;comment:ID" json:"id"`
|
||||
Avatar string `gorm:"column:avatar;type:varchar(255);comment:头像" json:"avatar"`
|
||||
Name string `gorm:"column:name;type:varchar(30);comment:真实姓名;NOT NULL" json:"name"`
|
||||
Phone string `gorm:"column:phone;type:char(12);comment:电话" json:"phone"`
|
||||
Status uint8 `gorm:"column:status;type:tinyint(1);default:1;comment:状态,1为正常,2为禁用;NOT NULL" json:"status"`
|
||||
Email string `gorm:"column:email;type:varchar(255);comment:邮箱" json:"email"`
|
||||
Roles string `gorm:"column:roles;type:varchar(255);comment:角色" json:"roles"`
|
||||
LastTime utils.CustomTime `gorm:"column:last_time;type:datetime;comment:最后一次登录时间" json:"last_time"`
|
||||
FailNumber int `gorm:"column:fail_number;type:tinyint(2);default:0;comment:连续登录失败次数" json:"fail_number"`
|
||||
}
|
||||
|
||||
type AdminInfoRet struct {
|
||||
AdminInfo
|
||||
Roles []int `json:"roles"`
|
||||
DepartmentId []int `json:"department_id"`
|
||||
Roles []int `json:"roles"`
|
||||
}
|
||||
|
||||
type AdminItemsRet struct {
|
||||
|
||||
@@ -25,7 +25,7 @@ type Authority struct {
|
||||
ParentIds string `gorm:"column:parent_ids;type:varchar(255);comment:多级父级菜单;NOT NULL" json:"parent_ids"`
|
||||
Level uint8 `gorm:"column:level;type:tinyint(2);default:0;comment:级别;NOT NULL" json:"level"`
|
||||
Type uint8 `gorm:"column:type;type:tinyint(2);comment:类型,1目录,2页面,3按钮;NOT NULL" json:"type"`
|
||||
ProjectId int `gorm:"column:project_id;type:int(11);comment:项目ID;NOT NULL" json:"project_id"`
|
||||
ServiceId int `gorm:"column:service_id;type:int(11);comment:项目ID;NOT NULL" json:"service_id"`
|
||||
Path string `gorm:"column:path;type:varchar(255);comment:页面请求地址;NOT NULL" json:"path"`
|
||||
Api string `gorm:"column:api;type:varchar(255);comment:接口地址" json:"api"`
|
||||
ViewPath string `gorm:"column:view_path;type:varchar(255);comment:页面文件路径" json:"view_path"`
|
||||
@@ -51,7 +51,7 @@ type AuthorityStatus struct {
|
||||
Id int `json:"id"`
|
||||
Status uint8 `json:"status"`
|
||||
Reason string `gorm:"column:reason;type:varchar(255);comment:原因" json:"reason"`
|
||||
ProjectId int `gorm:"column:project_id;type:int(11);comment:项目ID;NOT NULL" json:"project_id"`
|
||||
ServiceId int `gorm:"column:service_id;type:int(11);comment:项目ID;NOT NULL" json:"service_id"`
|
||||
AdminId int `json:"admin_id"`
|
||||
AdminName string `gorm:"column:admin_name;type:varchar(100);comment:操作人姓名" json:"admin_name"`
|
||||
UpdateTime utils.CustomTime `gorm:"column:update_time;type:datetime;default:NULL;comment:更新时间" json:"update_time"`
|
||||
@@ -70,7 +70,7 @@ type AuthorityItems struct {
|
||||
ParentIds string `json:"parent_ids"`
|
||||
Level uint8 `json:"level"`
|
||||
Type uint8 `json:"type"`
|
||||
ProjectId int `json:"project_id"`
|
||||
ServiceId int `json:"service_id"`
|
||||
Path string `json:"path"`
|
||||
Api string `json:"api"`
|
||||
ViewPath string `json:"view_path"`
|
||||
@@ -140,7 +140,7 @@ type AuthorityInfoNew struct {
|
||||
type AuthoritySort struct {
|
||||
Id int `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT;comment:ID" json:"id"`
|
||||
ParentId int `gorm:"column:parent_id;type:int(11);default:0;comment:父级菜单;NOT NULL" json:"parent_id"`
|
||||
ProjectId int `gorm:"column:project_id;type:int(11);comment:项目ID;NOT NULL" json:"project_id"`
|
||||
ServiceId int `gorm:"column:service_id;type:int(11);comment:项目ID;NOT NULL" json:"service_id"`
|
||||
Sort uint8 `gorm:"column:sort;type:smallint(3);default:1;comment:排序" json:"sort"`
|
||||
AdminId int `gorm:"column:admin_id;type:int(11);comment:操作人ID" json:"admin_id"`
|
||||
AdminName string `gorm:"column:admin_name;type:varchar(255);comment:操作人员姓名" json:"admin_name"`
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package dao
|
||||
|
||||
import (
|
||||
"github.com/golang-jwt/jwt/v4"
|
||||
"pkg.local/utils"
|
||||
)
|
||||
|
||||
type JwtInfo struct {
|
||||
Id int64 `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT" json:"id"`
|
||||
Avatar string `gorm:"column:avatar;type:varchar(255);comment:头像" json:"avatar"`
|
||||
Name string `gorm:"column:name;type:varchar(30);comment:真实姓名;NOT NULL" json:"name"`
|
||||
Phone string `gorm:"column:phone;type:char(12);comment:电话" json:"phone"`
|
||||
Email string `gorm:"column:email;type:varchar(255);comment:邮箱" json:"email"`
|
||||
Roles string `gorm:"column:roles;type:varchar(255);comment:角色" json:"roles"`
|
||||
LastTime utils.CustomTime `gorm:"column:last_time;type:datetime;comment:最后一次登录时间" json:"last_time"`
|
||||
Time int `json:"time"`
|
||||
jwt.RegisteredClaims
|
||||
}
|
||||
|
||||
type Token struct {
|
||||
Token string `json:"token"`
|
||||
}
|
||||
@@ -6,7 +6,7 @@ import "pkg.local/utils"
|
||||
type Role struct {
|
||||
Id int `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT;comment:ID" json:"id"`
|
||||
Name string `gorm:"column:name;type:varchar(255);comment:名称;NOT NULL" json:"name"`
|
||||
ProjectId int `gorm:"column:project_id;type:int(11);comment:项目ID;NOT NULL" json:"project_id"`
|
||||
ServiceId int `gorm:"column:service_id;type:int(11);comment:项目ID;NOT NULL" json:"service_id"`
|
||||
Status uint8 `gorm:"column:status;type:tinyint(1);default:1;comment:状态,1为正常,2为禁用;NOT NULL" json:"status"`
|
||||
Rules string `gorm:"column:rules;type:text;comment:权限内容" json:"rules"`
|
||||
Reason string `gorm:"column:reason;type:varchar(255);comment:原因" json:"reason"`
|
||||
@@ -43,10 +43,10 @@ type RoleItems struct {
|
||||
type RoleNameItems struct {
|
||||
Id int `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT" json:"id"`
|
||||
Name string `gorm:"column:name;type:varchar(255);comment:项目描述;NOT NULL" json:"name"`
|
||||
ProjectId int `json:"project_id"`
|
||||
ServiceId int `json:"service_id"`
|
||||
}
|
||||
|
||||
type RoleProjectNameItems struct {
|
||||
type RoleServiceNameItems struct {
|
||||
Id int `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT" json:"id"`
|
||||
Name string `gorm:"column:name;type:varchar(255);comment:项目描述;NOT NULL" json:"name"`
|
||||
Items []RoleNameItems `json:"items"`
|
||||
@@ -61,7 +61,7 @@ type RoleRulesItems struct {
|
||||
type RoleInfo struct {
|
||||
Id int `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT;comment:ID" json:"id"`
|
||||
Name string `gorm:"column:name;type:varchar(255);comment:名称;NOT NULL" json:"name"`
|
||||
ProjectId int `gorm:"column:project_id;type:int(11);comment:项目ID;NOT NULL" json:"project_id"`
|
||||
ServiceId int `gorm:"column:service_id;type:int(11);comment:项目ID;NOT NULL" json:"service_id"`
|
||||
Status uint8 `gorm:"column:status;type:tinyint(1);default:1;comment:状态,1为正常,2为禁用;NOT NULL" json:"status"`
|
||||
Rules []int `gorm:"column:rules;type:text;comment:权限内容" json:"rules"`
|
||||
Reason string `gorm:"column:reason;type:varchar(255);comment:原因" json:"reason"`
|
||||
|
||||
@@ -2,13 +2,12 @@ package dao
|
||||
|
||||
import "pkg.local/utils"
|
||||
|
||||
// Project 项目表
|
||||
type Project struct {
|
||||
// Services 项目表
|
||||
type Services struct {
|
||||
Id int `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT" json:"id"`
|
||||
Name string `gorm:"column:name;type:varchar(255);comment:项目描述;NOT NULL" json:"name"`
|
||||
Status uint8 `gorm:"column:status;type:tinyint(1);default:1;comment:状态,1为正常,2为禁用;NOT NULL" json:"status"`
|
||||
Remarks string `gorm:"column:remarks;type:varchar(255);default:'';comment:描述;NOT NULL" json:"remarks"`
|
||||
Logo string `gorm:"column:logo;type:varchar(255);default:'';comment:logo;NOT NULL" json:"logo"`
|
||||
Reason string `gorm:"column:reason;type:varchar(255);comment:原因" json:"reason"`
|
||||
AdminId int `gorm:"column:admin_id;type:int(11);comment:操作人员ID" json:"admin_id"`
|
||||
AdminName string `gorm:"column:admin_name;type:varchar(255);comment:操作人员姓名" json:"admin_name"`
|
||||
@@ -16,13 +15,13 @@ type Project struct {
|
||||
UpdateTime utils.CustomTime `gorm:"column:update_time;type:datetime" json:"update_time"`
|
||||
}
|
||||
|
||||
type ProjectItems struct {
|
||||
Items []Project `json:"items"`
|
||||
Count int64 `json:"count"`
|
||||
type ServicesItems struct {
|
||||
Items []Services `json:"items"`
|
||||
Count int64 `json:"count"`
|
||||
}
|
||||
|
||||
// ProjectStatus 修改状态
|
||||
type ProjectStatus struct {
|
||||
// ServicesStatus 修改状态
|
||||
type ServicesStatus struct {
|
||||
Id int `json:"id"`
|
||||
Status uint8 `json:"status"`
|
||||
Reason string `gorm:"column:reason;type:varchar(255);comment:原因" json:"reason"`
|
||||
@@ -31,7 +30,7 @@ type ProjectStatus struct {
|
||||
UpdateTime utils.CustomTime `gorm:"column:update_time;type:datetime" json:"update_time"`
|
||||
}
|
||||
|
||||
type ProjectNameItems struct {
|
||||
type ServicesNameItems struct {
|
||||
Id int `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT" json:"id"`
|
||||
Name string `gorm:"column:name;type:varchar(255);comment:项目描述;NOT NULL" json:"name"`
|
||||
Logo string `gorm:"column:logo;type:varchar(255);default:'';comment:logo;NOT NULL" json:"logo"`
|
||||
|
||||
Reference in New Issue
Block a user