12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- package admin
- import "time"
- type Admin struct {
- AdminID int64 `gorm:"primaryKey;column:admin_id;type:bigint(20);not null" json:"adminId"`
- AdminName string `gorm:"uniqueIndex:un;index:name;index:admin_pass;column:admin_name;type:varchar(60);not null" json:"adminName"`
- AdminAvatar string `gorm:"column:admin_avatar;type:varchar(255)" json:"adminAvatar"`
- RealName string `gorm:"column:real_name;type:varchar(60)" json:"realName"`
- Password string `gorm:"index:password;index:admin_pass;column:password;type:varchar(60);not null" json:"password"`
- LastUpdatedPasswordTime time.Time `gorm:"column:last_updated_password_time;type:datetime" json:"lastUpdatedPasswordTime"`
- Enabled int8 `gorm:"uniqueIndex:un;column:enabled;type:tinyint(1);not null;default:1" json:"enabled"`
- Email string `gorm:"column:email;type:varchar(60)" json:"email"`
- LastLoginTime time.Time `gorm:"column:last_login_time;type:datetime" json:"lastLoginTime"`
- CreatedTime time.Time `gorm:"index:created_time;column:created_time;type:datetime;default:CURRENT_TIMESTAMP" json:"createdTime"`
- LastUpdatedTime time.Time `gorm:"index:last_updated_time;column:last_updated_time;type:timestamp;not null;default:CURRENT_TIMESTAMP" json:"lastUpdatedTime"`
- Role string `gorm:"column:role;type:varchar(30);default:saller" json:"role"`
- Mobile string `gorm:"column:mobile;type:varchar(20)" json:"mobile"`
- RoleType int8 `gorm:"column:role_type;type:tinyint(4);default:0" json:"roleType"`
- RoleID int `gorm:"column:role_id;type:int(11);default:0" json:"roleId"`
- RoleName string `gorm:"column:role_name;type:varchar(100)" json:"roleName"`
- RoleTypeCode string `gorm:"column:role_type_code;type:varchar(20);default:''" json:"roleTypeCode"`
- DepartmentID int `gorm:"column:department_id;type:int(11);default:0" json:"departmentId"`
- DepartmentName string `gorm:"column:department_name;type:varchar(100)" json:"departmentName"`
- GroupID int `gorm:"column:group_id;type:int(11);default:0" json:"groupId"`
- GroupName string `gorm:"column:group_name;type:varchar(100)" json:"groupName"`
- Authority int8 `gorm:"column:authority;type:tinyint(4);default:0" json:"authority"`
- Position string `gorm:"column:position;type:varchar(100)" json:"position"`
- OpenId string `gorm:"column:open_id;type:varchar(100)" json:"open_id"`
- }
- func (m *Admin) TableName() string {
- return "admin"
- }
- var AdminColumns = struct {
- AdminID string
- AdminName string
- RealName string
- Password string
- LastUpdatedPasswordTime string
- Enabled string
- Email string
- LastLoginTime string
- CreatedTime string
- LastUpdatedTime string
- Role string
- Mobile string
- RoleType string
- RoleID string
- RoleName string
- RoleTypeCode string
- DepartmentID string
- DepartmentName string
- GroupID string
- GroupName string
- Authority string
- Position string
- }{
- AdminID: "admin_id",
- AdminName: "admin_name",
- RealName: "real_name",
- Password: "password",
- LastUpdatedPasswordTime: "last_updated_password_time",
- Enabled: "enabled",
- Email: "email",
- LastLoginTime: "last_login_time",
- CreatedTime: "created_time",
- LastUpdatedTime: "last_updated_time",
- Role: "role",
- Mobile: "mobile",
- RoleType: "role_type",
- RoleID: "role_id",
- RoleName: "role_name",
- RoleTypeCode: "role_type_code",
- DepartmentID: "department_id",
- DepartmentName: "department_name",
- GroupID: "group_id",
- GroupName: "group_name",
- Authority: "authority",
- Position: "position",
- }
|