add tables
This commit is contained in:
30
database/models/sys_apis.gen.go
Normal file
30
database/models/sys_apis.gen.go
Normal file
@@ -0,0 +1,30 @@
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
const TableNameSysAPI = "sys_apis"
|
||||
|
||||
// SysAPI mapped from table <sys_apis>
|
||||
type SysAPI struct {
|
||||
ID uint64 `gorm:"column:id;type:bigint(20) unsigned;primaryKey;autoIncrement:true" json:"id"`
|
||||
CreatedAt time.Time `gorm:"column:created_at;type:datetime(3)" json:"created_at"`
|
||||
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime(3)" json:"updated_at"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3)" json:"deleted_at"`
|
||||
Path string `gorm:"column:path;type:varchar(191)" json:"path"` // 路径
|
||||
Description string `gorm:"column:description;type:varchar(191)" json:"description"` // 中文描述
|
||||
APIGroup string `gorm:"column:api_group;type:varchar(191)" json:"api_group"` // 组
|
||||
Method string `gorm:"column:method;type:varchar(191);default:GET" json:"method"` // 方法
|
||||
}
|
||||
|
||||
// TableName SysAPI's table name
|
||||
func (*SysAPI) TableName() string {
|
||||
return TableNameSysAPI
|
||||
}
|
||||
30
database/models/sys_dictionaries.gen.go
Normal file
30
database/models/sys_dictionaries.gen.go
Normal file
@@ -0,0 +1,30 @@
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
const TableNameSysDictionary = "sys_dictionaries"
|
||||
|
||||
// SysDictionary mapped from table <sys_dictionaries>
|
||||
type SysDictionary struct {
|
||||
ID uint64 `gorm:"column:id;type:bigint(20) unsigned;primaryKey;autoIncrement:true" json:"id"`
|
||||
CreatedAt time.Time `gorm:"column:created_at;type:datetime(3)" json:"created_at"`
|
||||
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime(3)" json:"updated_at"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3)" json:"deleted_at"`
|
||||
Name string `gorm:"column:name;type:varchar(191)" json:"name"` // 字典名(中)
|
||||
Type string `gorm:"column:type;type:varchar(191)" json:"type"` // 字典名(英)
|
||||
Status bool `gorm:"column:status;type:tinyint(1)" json:"status"` // 状态
|
||||
Desc string `gorm:"column:desc;type:varchar(191)" json:"desc"` // 描述
|
||||
}
|
||||
|
||||
// TableName SysDictionary's table name
|
||||
func (*SysDictionary) TableName() string {
|
||||
return TableNameSysDictionary
|
||||
}
|
||||
31
database/models/sys_dictionary_details.gen.go
Normal file
31
database/models/sys_dictionary_details.gen.go
Normal file
@@ -0,0 +1,31 @@
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
const TableNameSysDictionaryDetail = "sys_dictionary_details"
|
||||
|
||||
// SysDictionaryDetail mapped from table <sys_dictionary_details>
|
||||
type SysDictionaryDetail struct {
|
||||
ID uint64 `gorm:"column:id;type:bigint(20) unsigned;primaryKey;autoIncrement:true" json:"id"`
|
||||
CreatedAt time.Time `gorm:"column:created_at;type:datetime(3)" json:"created_at"`
|
||||
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime(3)" json:"updated_at"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3)" json:"deleted_at"`
|
||||
Label string `gorm:"column:label;type:varchar(191)" json:"label"` // 展示值
|
||||
Value int64 `gorm:"column:value;type:bigint(20)" json:"value"` // 字典值
|
||||
Status bool `gorm:"column:status;type:tinyint(1)" json:"status"` // 启用状态
|
||||
Sort int64 `gorm:"column:sort;type:bigint(20)" json:"sort"` // 排序标记
|
||||
SysDictionaryID int64 `gorm:"column:sys_dictionary_id;type:bigint(20)" json:"sys_dictionary_id"` // 关联标记
|
||||
}
|
||||
|
||||
// TableName SysDictionaryDetail's table name
|
||||
func (*SysDictionaryDetail) TableName() string {
|
||||
return TableNameSysDictionaryDetail
|
||||
}
|
||||
30
database/models/sys_roles.gen.go
Normal file
30
database/models/sys_roles.gen.go
Normal file
@@ -0,0 +1,30 @@
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
const TableNameSysRole = "sys_roles"
|
||||
|
||||
// SysRole mapped from table <sys_roles>
|
||||
type SysRole struct {
|
||||
ID uint64 `gorm:"column:id;type:bigint(20) unsigned;primaryKey;autoIncrement:true" json:"id"`
|
||||
CreatedAt time.Time `gorm:"column:created_at;type:datetime(3)" json:"created_at"`
|
||||
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime(3)" json:"updated_at"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3)" json:"deleted_at"`
|
||||
Alias_ string `gorm:"column:alias;type:varchar(90);primaryKey" json:"alias"` // 角色Alias
|
||||
Name string `gorm:"column:name;type:varchar(191)" json:"name"` // 角色名
|
||||
ParentID uint64 `gorm:"column:parent_id;type:bigint(20) unsigned" json:"parent_id"` // 父角色ID
|
||||
DefaultRouter string `gorm:"column:default_router;type:varchar(191);default:dashboard" json:"default_router"` // 默认菜单
|
||||
}
|
||||
|
||||
// TableName SysRole's table name
|
||||
func (*SysRole) TableName() string {
|
||||
return TableNameSysRole
|
||||
}
|
||||
18
database/models/user_roles.gen.go
Normal file
18
database/models/user_roles.gen.go
Normal file
@@ -0,0 +1,18 @@
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
|
||||
package models
|
||||
|
||||
const TableNameUserRole = "user_roles"
|
||||
|
||||
// UserRole mapped from table <user_roles>
|
||||
type UserRole struct {
|
||||
UserID uint64 `gorm:"column:user_id;type:bigint(20) unsigned" json:"user_id"`
|
||||
RoleID uint64 `gorm:"column:role_id;type:bigint(20) unsigned" json:"role_id"`
|
||||
}
|
||||
|
||||
// TableName UserRole's table name
|
||||
func (*UserRole) TableName() string {
|
||||
return TableNameUserRole
|
||||
}
|
||||
35
database/models/users.gen.go
Normal file
35
database/models/users.gen.go
Normal file
@@ -0,0 +1,35 @@
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
const TableNameUser = "users"
|
||||
|
||||
// User mapped from table <users>
|
||||
type User struct {
|
||||
ID uint64 `gorm:"column:id;type:bigint(20) unsigned;primaryKey;autoIncrement:true" json:"id"`
|
||||
CreatedAt time.Time `gorm:"column:created_at;type:datetime(3)" json:"created_at"`
|
||||
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime(3)" json:"updated_at"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3)" json:"deleted_at"`
|
||||
UUID string `gorm:"column:uuid;type:varchar(191)" json:"uuid"` // UUID
|
||||
Username string `gorm:"column:username;type:varchar(191)" json:"username"` // 登录名
|
||||
Password string `gorm:"column:password;type:varchar(191)" json:"password"` // 登录密码
|
||||
Nickname string `gorm:"column:nickname;type:varchar(191)" json:"nickname"` // 昵称
|
||||
Avatar string `gorm:"column:avatar;type:varchar(191)" json:"avatar"` // 头像
|
||||
RoleID uint64 `gorm:"column:role_id;type:bigint(20) unsigned;default:1" json:"role_id"` // 角色ID
|
||||
Phone string `gorm:"column:phone;type:varchar(191)" json:"phone"` // 手机号
|
||||
Email string `gorm:"column:email;type:varchar(191)" json:"email"` // 邮箱
|
||||
Status string `gorm:"column:status;type:varchar(191);default:ok" json:"status"` // 用户状态
|
||||
}
|
||||
|
||||
// TableName User's table name
|
||||
func (*User) TableName() string {
|
||||
return TableNameUser
|
||||
}
|
||||
Reference in New Issue
Block a user