2023-06-25 10:30:39 +00:00
|
|
|
package gmodel
|
|
|
|
|
|
|
|
import (
|
|
|
|
"gorm.io/gorm"
|
|
|
|
)
|
|
|
|
|
|
|
|
// fs_backend_user 管理员表
|
|
|
|
type FsBackendUser struct {
|
|
|
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // ID
|
2023-08-23 07:08:45 +00:00
|
|
|
Username *string `gorm:"unique_key;default:'';" json:"username"` //
|
|
|
|
AuthKey *string `gorm:"default:'';" json:"auth_key"` //
|
|
|
|
PasswordHash *string `gorm:"default:'';" json:"password_hash"` //
|
2023-06-25 10:30:39 +00:00
|
|
|
PasswordResetToken *string `gorm:"default:'';" json:"password_reset_token"` //
|
2023-08-23 07:08:45 +00:00
|
|
|
Email *string `gorm:"unique_key;default:'';" json:"email"` //
|
2023-06-25 10:30:39 +00:00
|
|
|
Status *int64 `gorm:"default:1;" json:"status"` // 状态
|
|
|
|
Icon *string `gorm:"default:'';" json:"icon"` //
|
|
|
|
DepartmentId *int64 `gorm:"default:0;" json:"department_id"` // 部门id
|
|
|
|
Permission *string `gorm:"default:'';" json:"permission"` // 权限设置
|
|
|
|
CreatedAt *int64 `gorm:"default:0;" json:"created_at"` // 创建时间
|
|
|
|
UpdatedAt *int64 `gorm:"default:0;" json:"updated_at"` // 更新时间
|
|
|
|
}
|
2023-07-20 02:13:18 +00:00
|
|
|
type FsBackendUserModel struct {
|
|
|
|
db *gorm.DB
|
|
|
|
name string
|
|
|
|
}
|
2023-06-25 10:30:39 +00:00
|
|
|
|
2023-07-20 02:13:18 +00:00
|
|
|
func NewFsBackendUserModel(db *gorm.DB) *FsBackendUserModel {
|
|
|
|
return &FsBackendUserModel{db: db, name: "fs_backend_user"}
|
|
|
|
}
|