models

package
v0.0.0-...-79307e8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveLoginLog

func SaveLoginLog(message storage.Messager) (err error)

SaveLoginLog 从队列中获取登录日志

func SaveOperaLog

func SaveOperaLog(message storage.Messager) (err error)

SaveOperaLog 从队列中获取操作日志

func SaveSysApi

func SaveSysApi(message storage.Messager) (err error)

Types

type SysApi

type SysApi struct {
	Id     int    `json:"id" gorm:"primaryKey;autoIncrement;comment:主键编码"`
	Handle string `json:"handle" gorm:"size:128;comment:handle"`
	Title  string `json:"title" gorm:"size:128;comment:标题"`
	Path   string `json:"path" gorm:"size:128;comment:地址"`
	Type   string `json:"type" gorm:"size:16;comment:接口类型"`
	Action string `json:"action" gorm:"size:16;comment:请求类型"`
	models.ModelTime
	models.ControlBy
}

func (SysApi) TableName

func (SysApi) TableName() string

type SysConfig

type SysConfig struct {
	models.Model
	ConfigName  string `json:"configName" gorm:"size:128;comment:ConfigName"`   //
	ConfigKey   string `json:"configKey" gorm:"size:128;comment:ConfigKey"`     //
	ConfigValue string `json:"configValue" gorm:"size:255;comment:ConfigValue"` //
	ConfigType  string `json:"configType" gorm:"size:64;comment:ConfigType"`
	IsFrontend  int    `json:"isFrontend" gorm:"size:64;comment:是否前台"` //
	Remark      string `json:"remark" gorm:"size:128;comment:Remark"`  //
	models.ControlBy
	models.ModelTime
}

func (SysConfig) TableName

func (SysConfig) TableName() string

type SysDept

type SysDept struct {
	DeptId   int    `json:"deptId" gorm:"primaryKey;autoIncrement;"` //部门编码
	ParentId int    `json:"parentId" gorm:""`                        //上级部门
	DeptPath string `json:"deptPath" gorm:"size:255;"`               //
	DeptName string `json:"deptName"  gorm:"size:128;"`              //部门名称
	Sort     int    `json:"sort" gorm:"size:4;"`                     //排序
	Leader   string `json:"leader" gorm:"size:128;"`                 //负责人
	Phone    string `json:"phone" gorm:"size:11;"`                   //手机
	Email    string `json:"email" gorm:"size:64;"`                   //邮箱
	Status   int    `json:"status" gorm:"size:4;"`                   //状态
	models.ControlBy
	models.ModelTime
	DataScope string    `json:"dataScope" gorm:"-"`
	Params    string    `json:"params" gorm:"-"`
	Children  []SysDept `json:"children" gorm:"-"`
}

func (SysDept) TableName

func (SysDept) TableName() string

type SysDictData

type SysDictData struct {
	DictCode  int    `json:"dictCode" gorm:"primaryKey;column:dict_code;autoIncrement;comment:主键编码"`
	DictSort  int    `json:"dictSort" gorm:"size:20;comment:DictSort"`
	DictLabel string `json:"dictLabel" gorm:"size:128;comment:DictLabel"`
	DictValue string `json:"dictValue" gorm:"size:255;comment:DictValue"`
	DictType  string `json:"dictType" gorm:"size:64;comment:DictType"`
	CssClass  string `json:"cssClass" gorm:"size:128;comment:CssClass"`
	ListClass string `json:"listClass" gorm:"size:128;comment:ListClass"`
	IsDefault string `json:"isDefault" gorm:"size:8;comment:IsDefault"`
	Status    int    `json:"status" gorm:"size:4;comment:Status"`
	Default   string `json:"default" gorm:"size:8;comment:Default"`
	Remark    string `json:"remark" gorm:"size:255;comment:Remark"`
	models.ControlBy
	models.ModelTime
}

func (SysDictData) TableName

func (SysDictData) TableName() string

type SysDictType

type SysDictType struct {
	ID       int    `json:"id" gorm:"primaryKey;column:dict_id;autoIncrement;comment:主键编码"`
	DictName string `json:"dictName" gorm:"size:128;comment:DictName"`
	DictType string `json:"dictType" gorm:"size:128;comment:DictType"`
	Status   int    `json:"status" gorm:"size:4;comment:Status"`
	Remark   string `json:"remark" gorm:"size:255;comment:Remark"`
	models.ControlBy
	models.ModelTime
}

func (SysDictType) TableName

func (SysDictType) TableName() string

type SysLoginLog

type SysLoginLog struct {
	models.Model
	Username      string    `json:"username" gorm:"size:128;comment:用户名"`
	Status        string    `json:"status" gorm:"size:4;comment:状态"`
	Ipaddr        string    `json:"ipaddr" gorm:"size:255;comment:ip地址"`
	LoginLocation string    `json:"loginLocation" gorm:"size:255;comment:归属地"`
	Browser       string    `json:"browser" gorm:"size:255;comment:浏览器"`
	Os            string    `json:"os" gorm:"size:255;comment:系统"`
	Platform      string    `json:"platform" gorm:"size:255;comment:固件"`
	LoginTime     time.Time `json:"loginTime" gorm:"comment:登录时间"`
	Remark        string    `json:"remark" gorm:"size:255;comment:备注"`
	Msg           string    `json:"msg" gorm:"size:255;comment:信息"`
	CreatedAt     time.Time `json:"createdAt" gorm:"comment:创建时间"`
	UpdatedAt     time.Time `json:"updatedAt" gorm:"comment:最后更新时间"`
	models.ControlBy
}

func (SysLoginLog) TableName

func (SysLoginLog) TableName() string

type SysMenu

type SysMenu struct {
	MenuId     int       `json:"menuId" gorm:"primaryKey;autoIncrement"`
	MenuName   string    `json:"menuName" gorm:"size:128;"`
	Title      string    `json:"title" gorm:"size:128;"`
	Icon       string    `json:"icon" gorm:"size:128;"`
	Path       string    `json:"path" gorm:"size:128;"`
	Paths      string    `json:"paths" gorm:"size:128;"`
	MenuType   string    `json:"menuType" gorm:"size:1;"`
	Action     string    `json:"action" gorm:"size:16;"`
	Permission string    `json:"permission" gorm:"size:255;"`
	ParentId   int       `json:"parentId" gorm:"size:11;"`
	NoCache    bool      `json:"noCache" gorm:"size:8;"`
	Breadcrumb string    `json:"breadcrumb" gorm:"size:255;"`
	Component  string    `json:"component" gorm:"size:255;"`
	Sort       int       `json:"sort" gorm:"size:4;"`
	Visible    string    `json:"visible" gorm:"size:1;"`
	IsFrame    string    `json:"isFrame" gorm:"size:1;DEFAULT:0;"`
	SysApi     []SysApi  `json:"sysApi" gorm:"many2many:sys_menu_api_rule"`
	Apis       []int     `json:"apis" gorm:"-"`
	Params     string    `json:"params" gorm:"-"`
	RoleId     int       `gorm:"-"`
	Children   []SysMenu `json:"children,omitempty" gorm:"-"`
	IsSelect   bool      `json:"is_select" gorm:"-"`
	models.ControlBy
	models.ModelTime
}

func (SysMenu) TableName

func (SysMenu) TableName() string

type SysOperaLog

type SysOperaLog struct {
	models.Model
	Title         string    `json:"title" gorm:"size:255;comment:操作模块"`
	BusinessType  string    `json:"businessType" gorm:"size:128;comment:操作类型"`
	BusinessTypes string    `json:"businessTypes" gorm:"size:128;comment:BusinessTypes"`
	Method        string    `json:"method" gorm:"size:128;comment:函数"`
	RequestMethod string    `json:"requestMethod" gorm:"size:128;comment:请求方式"`
	OperatorType  string    `json:"operatorType" gorm:"size:128;comment:操作类型"`
	OperName      string    `json:"operName" gorm:"size:128;comment:操作者"`
	DeptName      string    `json:"deptName" gorm:"size:128;comment:部门名称"`
	OperUrl       string    `json:"operUrl" gorm:"size:255;comment:访问地址"`
	OperIp        string    `json:"operIp" gorm:"size:128;comment:客户端ip"`
	OperLocation  string    `json:"operLocation" gorm:"size:128;comment:访问位置"`
	OperParam     string    `json:"operParam" gorm:"size:255;comment:请求参数"`
	Status        string    `json:"status" gorm:"size:4;comment:操作状态"`
	OperTime      time.Time `json:"operTime" gorm:"comment:操作时间"`
	JsonResult    string    `json:"jsonResult" gorm:"size:255;comment:返回数据"`
	Remark        string    `json:"remark" gorm:"size:255;comment:备注"`
	LatencyTime   string    `json:"latencyTime" gorm:"size:128;comment:耗时"`
	UserAgent     string    `json:"userAgent" gorm:"size:255;comment:ua"`
	CreatedAt     time.Time `json:"createdAt" gorm:"comment:创建时间"`
	UpdatedAt     time.Time `json:"updatedAt" gorm:"comment:最后更新时间"`
	models.ControlBy
}

func (SysOperaLog) TableName

func (SysOperaLog) TableName() string

type SysPost

type SysPost struct {
	PostId   int    `gorm:"primaryKey;autoIncrement" json:"postId"` //岗位编号
	PostName string `gorm:"size:128;" json:"postName"`              //岗位名称
	PostCode string `gorm:"size:128;" json:"postCode"`              //岗位代码
	Sort     int    `gorm:"size:4;" json:"sort"`                    //岗位排序
	Status   int    `gorm:"size:4;" json:"status"`                  //状态
	Remark   string `gorm:"size:255;" json:"remark"`                //描述
	models.ControlBy
	models.ModelTime

	Params string `gorm:"-" json:"params"`
}

func (SysPost) TableName

func (SysPost) TableName() string

type SysRole

type SysRole struct {
	RoleId    int        `json:"roleId" gorm:"primaryKey;autoIncrement"` // 角色编码
	RoleName  string     `json:"roleName" gorm:"size:128;"`              // 角色名称
	Status    string     `json:"status" gorm:"size:4;"`                  //
	RoleKey   string     `json:"roleKey" gorm:"size:128;"`               //角色代码
	RoleSort  int        `json:"roleSort" gorm:""`                       //角色排序
	Flag      string     `json:"flag" gorm:"size:128;"`                  //
	Remark    string     `json:"remark" gorm:"size:255;"`                //备注
	Admin     bool       `json:"admin" gorm:"size:4;"`
	DataScope string     `json:"dataScope" gorm:"size:8;"`
	Params    string     `json:"params" gorm:"-"`
	MenuIds   []int      `json:"menuIds" gorm:"-"`
	DeptIds   []int      `json:"deptIds" gorm:"-"`
	SysDept   []SysDept  `` /* 128-byte string literal not displayed */
	SysMenu   *[]SysMenu `` /* 128-byte string literal not displayed */
	models.ControlBy
	models.ModelTime
}

func (SysRole) TableName

func (SysRole) TableName() string

type SysUser

type SysUser struct {
	UserId   int      `gorm:"primaryKey;autoIncrement;comment:编码"  json:"userId"`
	Username string   `json:"username" gorm:"size:64;comment:用户名"`
	Password string   `json:"-" gorm:"size:128;comment:密码"`
	NickName string   `json:"nickName" gorm:"size:128;comment:昵称"`
	Phone    string   `json:"phone" gorm:"size:11;comment:手机号"`
	RoleId   int      `json:"roleId" gorm:"size:20;comment:角色ID"`
	Salt     string   `json:"-" gorm:"size:255;comment:加盐"`
	Avatar   string   `json:"avatar" gorm:"size:255;comment:头像"`
	Sex      string   `json:"sex" gorm:"size:255;comment:性别"`
	Email    string   `json:"email" gorm:"size:128;comment:邮箱"`
	DeptId   int      `json:"deptId" gorm:"size:20;comment:部门"`
	PostId   int      `json:"postId" gorm:"size:20;comment:岗位"`
	Remark   string   `json:"remark" gorm:"size:255;comment:备注"`
	Status   string   `json:"status" gorm:"size:4;comment:状态"`
	DeptIds  []int    `json:"deptIds" gorm:"-"`
	PostIds  []int    `json:"postIds" gorm:"-"`
	RoleIds  []int    `json:"roleIds" gorm:"-"`
	Dept     *SysDept `json:"dept"`
	models.ControlBy
	models.ModelTime
}

func (*SysUser) AfterFind

func (e *SysUser) AfterFind(_ *gorm.DB) error

func (*SysUser) BeforeCreate

func (e *SysUser) BeforeCreate(_ *gorm.DB) error

func (*SysUser) BeforeUpdate

func (e *SysUser) BeforeUpdate(_ *gorm.DB) error

func (*SysUser) Encrypt

func (e *SysUser) Encrypt() (err error)

加密

func (SysUser) TableName

func (SysUser) TableName() string

type TbxCountry

type TbxCountry struct {
	Code   string `json:"code" gorm:"size:4;column:code;primaryKey;comment:编码"`
	CName  string `json:"cName" gorm:"size:64;unique;column:c_name;comment:中文名称"`
	EName  string `json:"eName" gorm:"size:64;unique;column:e_name;comment:English Name"`
	EName2 string `json:"eName2" gorm:"size:64;column:e_name2;comment:English Name 2"`
	Code2  string `json:"code2" gorm:"size:4;unique;column:code2;comment:编码2"`
	Code3  string `json:"code3" gorm:"size:4;unique;column:code3;comment:编码3"`
	models.ControlBy
	models.ModelTime
}

func (TbxCountry) TableName

func (TbxCountry) TableName() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL