mirror of
https://gitcode.com/flipped-aurora/gin-vue-admin.git
synced 2026-05-14 19:28:00 +00:00
数据初始化完成
This commit is contained in:
@@ -3,6 +3,7 @@ package model
|
||||
import (
|
||||
"github.com/satori/go.uuid"
|
||||
"gorm.io/gorm"
|
||||
"time"
|
||||
)
|
||||
|
||||
type SysUser struct {
|
||||
@@ -15,3 +16,10 @@ type SysUser struct {
|
||||
Authority SysAuthority `json:"authority" gorm:"foreignKey:AuthorityId;references:AuthorityId;comment:'用户角色'"`
|
||||
AuthorityId string `json:"authorityId" gorm:"default:888;comment:'用户角色ID'"`
|
||||
}
|
||||
|
||||
func SysUserData() []SysUser {
|
||||
return []SysUser{
|
||||
{Model: gorm.Model{ID: 1, CreatedAt: time.Now(), UpdatedAt: time.Now()}, UUID: uuid.NewV4(), Username: "admin", Password: "e10adc3949ba59abbe56e057f20f883e", NickName: "超级管理员", HeaderImg: "http://qmplusimg.henrongyi.top/1571627762timg.jpg", AuthorityId: "888"},
|
||||
{Model: gorm.Model{ID: 2, CreatedAt: time.Now(), UpdatedAt: time.Now()}, UUID: uuid.NewV4(), Username: "a303176530", Password: "3ec063004a6f31642261936a379fde3d", NickName: "QMPlusUser", HeaderImg: "http://qmplusimg.henrongyi.top/1572075907logo.png", AuthorityId: "9528"},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user