12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- package models
-
- type AdminUser struct {
- Id int64 `gorm:"PRIMARY_KEY;AUTO_INCREMENT" json:"id"` // 管理员用户 ID
- Mobile string `json:"mobile"`
- Password string `json:"password"`
- IsSuperAdmin bool `gorm:"column:is_super_admin" json:"is_super_admin"` // 是否为超级管理员
- Status int8 `json:"status"` // 状态 0.无效 1.有效
- CreateTime int64 `gorm:"column:ctime" json:"ctime"` // 创建时间
- ModifyTime int64 `gorm:"column:mtime" json:"mtime"` // 修改时间
- }
-
- func (AdminUser) TableName() string {
- return "sgj_user_admin"
- }
-
- type AdminUserLoginLog struct {
- Id int64 `gorm:"PRIMARY_KEY;AUTO_INCREMENT"` // 记录 ID
- AdminUserId int64 `gorm:"column:admin_user_id"`
- OrgId int64 `gorm:"column:org_id"`
- AppId int64 `gorm:"column:app_id"`
- IP string `gorm:"column:ip"`
- OperateType int8 `gorm:"column:operate_type"` // 操作类型(1.登录;2.退出;3.切换机构)
- AppType int8 `gorm:"column:app_type"` // 应用类型,与 OrgApp.AppType 一致
- CreateTime int64 `gorm:"column:ctime"` // 创建时间
- }
-
- func (AdminUserLoginLog) TableName() string {
- return "sgj_user_admin_login_log"
- }
-
- type AdminUserElectronicSignature struct {
- ID int64 `gorm:"column:id" json:"id" form:"id"`
- Creator int64 `gorm:"column:creator" json:"creator" form:"creator"`
- OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
- AppId int64 `gorm:"column:app_id" json:"app_id" form:"app_id"`
- Url string `gorm:"column:url" json:"url" form:"url"`
- Hash string `gorm:"column:hash" json:"hash" form:"hash"`
- 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 (AdminUserElectronicSignature) TableName() string {
- return "sgj_user_admin_electronic_signature"
- }
-
- // 管理员用户特殊权限,详见表注释
- type AdminUserSpecialPermission struct {
- ID int64 `gorm:"column:id" json:"id"`
- OrgID int64 `gorm:"column:org_id" json:"org_id"`
- AppID int64 `gorm:"column:app_id" json:"app_id"`
- AdminUserID int64 `gorm:"column:admin_user_id" json:"admin_user_id"`
- Permission int64 `gorm:"column:permission" json:"permission"`
- Status int64 `gorm:"column:status" json:"-"`
- CreateTime int64 `gorm:"column:ctime" json:"-"`
- ModifyTime int64 `gorm:"column:mtime" json:"-"`
- }
-
- func (AdminUserSpecialPermission) TableName() string {
- return "xt_admin_user_special_permission"
- }
-
- type SpecialPermissionType int64
-
- const (
- _ SpecialPermissionType = iota
- SpecialPermissionTypeHeadNurse // 护士长
- )
|