package models type Role struct { Id int64 `gorm:"PRIMARY_KEY;AUTO_INCREMENT" json:"id"` RoleName string `gorm:"column:role_name" json:"name"` RoleIntro string `gorm:"column:role_introduction" json:"intro"` Creator int64 `json:"-"` OrgId int64 `gorm:"column:org_id" json:"-"` AppId int64 `gorm:"column:app_id" json:"-"` IsSuperAdmin bool `gorm:"column:is_super_admin" json:"is_super_admin"` Status int8 `json:"status"` // 状态 0.无效 1.有效 2.禁用 CreateTime int64 `gorm:"column:ctime" json:"-"` // 创建时间 ModifyTime int64 `gorm:"column:mtime" json:"-"` // 修改时间 StaffNumber int64 `gorm:"-" json:"staff_number"` Number int64 `gorm:"number" json:"number"` IsSystem int64 `gorm:"column:is_system" json:"is_system" form:"is_system"` } func (Role) TableName() string { return "sgj_user_role" } type App_Roles struct { Id int64 `gorm:"PRIMARY_KEY;AUTO_INCREMENT" json:"id"` AdminUserId int64 `gorm:"column:admin_user_id" json:"admin_user_id"` OrgId int64 `gorm:"column:org_id" json:"org_id"` AppId int64 `gorm:"column:app_id" json:"app_id"` RoleId int64 `gorm:"column:role_id" json:"role_id"` Avatar string `json:"avatar" json:"avatar"` UserName string `gorm:"column:user_name" json:"user_name"` // 用户名称 Intro string `json:"intro"` // 简介 UserType int8 `gorm:"column:user_type" json:"user_type"` // 用户类型(1.管理员;2.医生;3.护士;4.运营) UserTitle int8 `gorm:"column:user_title" json:"user_title"` // 用户职称(1.医士;2.医师;3.住院医师;4.主治医师;5.副主任医师;6.主任医师;7.护士;8.护师;9.主管护师;10.副主任护师;11.主任护师;12.运营专员;13.运营主管) Status int8 `json:"status"` // 状态 0.无效 1.有效 CreateTime int64 `gorm:"column:ctime" json:"ctime"` // 创建时间 ModifyTime int64 `gorm:"column:mtime" json:"mtime"` // 修改时间 Url string `gorm:"column:url" json:"url" form:"url"` } type App_Role struct { Id int64 `gorm:"PRIMARY_KEY;AUTO_INCREMENT" json:"id"` AdminUserId int64 `gorm:"column:admin_user_id" json:"admin_user_id"` OrgId int64 `gorm:"column:org_id" json:"org_id"` AppId int64 `gorm:"column:app_id" json:"app_id"` RoleId int64 `gorm:"column:role_id" json:"role_id"` Avatar string `json:"avatar" json:"avatar"` UserName string `gorm:"column:user_name" json:"user_name"` // 用户名称 Intro string `json:"intro"` // 简介 UserType int8 `gorm:"column:user_type" json:"user_type"` // 用户类型(1.管理员;2.医生;3.护士;4.运营) UserTitle int8 `gorm:"column:user_title" json:"user_title"` // 用户职称(1.医士;2.医师;3.住院医师;4.主治医师;5.副主任医师;6.主任医师;7.护士;8.护师;9.主管护师;10.副主任护师;11.主任护师;12.运营专员;13.运营主管) Status int8 `json:"status"` // 状态 0.无效 1.有效 CreateTime int64 `gorm:"column:ctime" json:"ctime"` // 创建时间 ModifyTime int64 `gorm:"column:mtime" json:"mtime"` // 修改时间UserTitleName string `gorm:"column:user_title_name" json:"user_title_name" form:"user_title_name"` UserTitleName string `gorm:"column:user_title_name" json:"user_title_name" form:"user_title_name"` RoleIds string `gorm:"column:role_ids" json:"role_ids" form:"role_ids"` AdminUser AdminUser `gorm:"ForeignKey:ID;AssociationForeignKey:AdminUserId" json:"admin"` //AdminUser AdminUser `gorm:"ForeignKey:ID;AssociationForeignKey:AdminUserId" json:"admin"` IsSubSuperAdmin bool `gorm:"-" json:"is_sub_super_admin" form:"is_sub_super_admin"` Message string `gorm:"column:message" json:"message" form:"message"` Sex int64 `gorm:"column:sex" json:"sex" form:"sex"` Birthday int64 `gorm:"column:birthday" json:"birthday" form:"birthday"` Sort int64 `gorm:"column:sort" json:"sort" form:"sort"` IsSort int64 `gorm:"column:is_sort" json:"is_sort" form:"is_sort"` DepartmentId int64 `gorm:"column:department_id" json:"department_id" form:"department_id"` Department string `gorm:"column:department" json:"department" form:"department"` Age int64 `gorm:"column:age" json:"age" form:"age"` Nation string `gorm:"column:nation" json:"nation" form:"nation"` CardType int64 `gorm:"column:card_type" json:"card_type" form:"card_type"` IdCard string `gorm:"column:id_card" json:"id_card" form:"id_card"` Education int64 `gorm:"column:education" json:"education" form:"education"` StudyMajorName string `gorm:"column:study_major_name" json:"study_major_name" form:"study_major_name"` WorkMajorName string `gorm:"column:work_major_name" json:"work_major_name" form:"work_major_name"` RoleType int64 `gorm:"column:role_type" json:"role_type" form:"role_type"` MedicalCode string `gorm:"column:medical_code" json:"medical_code" form:"medical_code"` DoctorCode string `gorm:"column:doctor_code" json:"doctor_code" form:"doctor_code"` Licensing int64 `gorm:"column:licensing" json:"licensing" form:"licensing"` JobNumber string `gorm:"column:job_number" json:"job_number" form:"job_number"` PrescriptionQualificationIdentification int64 `gorm:"column:prescription_qualification_identification" json:"prescription_qualification_identification" form:"prescription_qualification_identification"` IdentificationOutpatients int64 `gorm:"column:identification_outpatients" json:"identification_outpatients" form:"identification_outpatients"` StartTime int64 `gorm:"column:start_time" json:"start_time" form:"start_time"` MedicalRangeCode int64 `gorm:"column:medical_range_code" json:"medical_range_code" form:"medical_range_code"` MedicalLevel int64 `gorm:"column:medical_level" json:"medical_level" form:"medical_level"` MedicalTypeJob int64 `gorm:"column:medical_type_job" json:"medical_type_job" form:"medical_type_job"` PharmacistRegistrationNumber string `gorm:"column:pharmacist_registration_number" json:"pharmacist_registration_number" form:"pharmacist_registration_number"` DoctorRangeCode int64 `gorm:"column:doctor_range_code" json:"doctor_range_code" form:"doctor_range_code"` DoctorLevel int64 `gorm:"column:doctor_level" json:"doctor_level" form:"doctor_level"` DoctorTypeJob int64 `gorm:"column:doctor_type_job" json:"doctor_type_job" form:"doctor_type_job"` DoctorNumber string `gorm:"column:doctor_number" json:"doctor_number" form:"doctor_number"` OutpatientIllnesscategory string `gorm:"column:outpatient_illness_category" json:"outpatient_illness_category" form:"outpatient_illness_category"` IsActive int64 `gorm:"column:is_active" json:"is_active" form:"is_active"` ActiveStatus int64 `gorm:"column:active_status" json:"active_status" form:"active_status"` } func (App_Role) TableName() string { return "sgj_user_admin_role" } var UserType = map[int]string{ 1: "管理员", 2: "医生", 3: "护士", 4: "运营", } var UserTitle = map[int]string{ 1: "医士", 2: "医师", 3: "住院医师", 4: "主治医师", 5: "副主任医师", 6: "主任医师", 7: "护士", 8: "护师", 9: "主管护师", 10: "副主任护师", 11: "主任护师", 12: "运营专员", 13: "运营主管", } type SgjUserRoleFuncPurview struct { ID int64 `gorm:"column:id" json:"id" form:"id"` OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"` AppId int64 `gorm:"column:app_id" json:"app_id" form:"app_id"` RoleId int64 `gorm:"column:role_id" json:"role_id" form:"role_id"` PurviewIds string `gorm:"column:purview_ids" json:"purview_ids" form:"purview_ids"` Status int64 `gorm:"column:status" json:"status" form:"status"` Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"` Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"` } func (SgjUserRoleFuncPurview) TableName() string { return "sgj_user_role_func_purview" } type Roles struct { Id int64 `gorm:"PRIMARY_KEY;AUTO_INCREMENT" json:"id"` RoleName string `gorm:"column:role_name" json:"role_name"` RoleIntro string `gorm:"column:role_introduction" json:"intro"` Creator int64 `json:"-"` OrgId int64 `gorm:"column:org_id" json:"-"` AppId int64 `gorm:"column:app_id" json:"-"` IsSuperAdmin bool `gorm:"column:is_super_admin" json:"is_super_admin"` Status int8 `json:"status"` // 状态 0.无效 1.有效 2.禁用 CreateTime int64 `gorm:"column:ctime" json:"-"` // 创建时间 ModifyTime int64 `gorm:"column:mtime" json:"-"` // 修改时间 StaffNumber int64 `gorm:"-" json:"staff_number"` Number int64 `gorm:"column:number" json:"number" form:"number"` IsSystem int64 `gorm:"column:is_system" json:"is_system" form:"is_system"` } func (Roles) TableName() string { return "sgj_user_role" }