models

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account[T primary.Key] struct {
	Id        T      `column:"id" json:"id"`
	Account   string `column:"account" json:"account"`      // 账号
	Email     string `column:"email" json:"email"`          // 邮箱
	Phone     string `column:"phone" json:"phone"`          // 手机
	Name      string `column:"name" json:"name"`            // 姓名
	Gender    string `column:"gender" json:"gender"`        // 性别
	Birth     string `column:"birth" json:"birth"`          // 出生
	Picture   string `column:"picture" json:"picture"`      // 头像
	CreatTime string `column:"creat_time" json:"creatTime"` // 创建时间
	OrgId     string `column:"org_id" json:"orgId"`
	RoleId    string `column:"role_id" json:"roleId"` // 默认角色
	Role      string `column:"role" json:"role"`      // 角色
	Status    int    `column:"status" json:"status"`  // 用户状态 0:正常,1:停用,2:删除
}

type AddUser

type AddUser struct {
	Id    int
	OrgId int
	Roles []int `json:"roles"`
}

type Auth

type Auth struct {
	Id     int `column:"id"json:"id"`
	RoleId int `column:"role_id"json:"role_id"` // 角色id
	AuthId int `column:"auth_id"json:"auth_id"` // 授权id
}

type Authorization

type Authorization struct {
	Id     int `column:"id"`
	OrgId  int `column:"org_id"`  // 组织
	UserId int `column:"user_id"` // 用户
	RoleId int `column:"role_id"` // 角色
}

Authorization 组织用户角色授权关系

type FuncRouter

type FuncRouter struct {
	Id     int    `column:"id" json:"id"`
	Method string `column:"method" json:"method"` // 接口类型
	Name   string `column:"name" json:"name"`     // 功能名称
	Path   string `column:"path" json:"path"`     // 功能路径
	Status bool   `column:"status" json:"status"` // 状态
}

FuncRouter 功能路由

type MenuRouter struct {
	Id        int    `column:"id" json:"id"`
	Pid       int    `column:"pid" json:"pid"`             // 父节点
	Title     string `column:"title" json:"title"`         //标题
	Icon      string `column:"icon" json:"icon"`           // 图标组件
	Name      string `column:"name" json:"name"`           // 路由名称
	Component string `column:"component" json:"component"` // 路由组件
	Path      string `column:"path" json:"path"`           // 路由路径
	Remark    string `column:"remark"json:"remark"`
	Status    bool   `column:"status"json:"status"` //状态
	ToolId    int    `column:"tool_id"json:"toolId"`
}
func (receiver *MenuRouter) GetId() int
func (receiver *MenuRouter) GetName() string
func (receiver *MenuRouter) GetPid() int

type Org

type Org struct {
	Id         int    `column:"id" json:"id"`
	Pid        int    `column:"pid" json:"pid"`                // 上级
	Name       string `column:"name" json:"name"`              // 名称
	CreateTime string `column:"create_time" json:"createTime"` // 成立时间
}

func (*Org) GetId

func (o *Org) GetId() int

func (*Org) GetName

func (o *Org) GetName() string

func (*Org) GetPid

func (o *Org) GetPid() int

type Role

type Role struct {
	Id      int    `column:"id" json:"id"`
	OrgId   int    `column:"org_id" json:"orgId"`     // 角色所属组织id
	Name    string `column:"name" json:"name"`        // 角色名称
	RoleKey string `column:"role_key" json:"roleKey"` // 角色标识
}

type RoleUserFuncAuth

type RoleUserFuncAuth struct {
	Id     int64 `column:"id" json:"id"`
	OrgId  int   `column:"org_id" json:"orgId"`
	UserId int   `column:"user_id" json:"userId"`
	RoleId int   `column:"role_id" json:"roleId"`
	FuncId int   `column:"func_id" json:"funcId"`
}

type RoleUserMenuAuth

type RoleUserMenuAuth struct {
	Id     int64 `column:"id" json:"id"`
	OrgId  int   `column:"org_id" json:"orgId"`
	UserId int   `column:"user_id" json:"userId"`
	RoleId int   `column:"role_id" json:"roleId"`
	MenuId int   `column:"menu_id" json:"menuId"`
}

type RoleUserToolAuth

type RoleUserToolAuth struct {
	Id     int64 `column:"id" json:"id"`
	OrgId  int   `column:"org_id" json:"orgId"`
	UserId int   `column:"user_id" json:"userId"`
	RoleId int   `column:"role_id" json:"roleId"`
	ToolId int   `column:"tool_id" json:"toolId"`
}

type Tool

type Tool struct {
	Id        int    `column:"id" json:"id"`
	Name      string `column:"name" json:"name"` // 工具名称 一般是路由路径,并且不能重复
	Icon      string `column:"icon" json:"icon"` // 图标
	IsOpen    string `column:"isOpen" json:"isOpen"`
	Component string `column:"component" json:"component"` // 工具对应窗口组件
	Path      string `column:"path" json:"path"`           // 工具路径 /{basePath}/{name}
	Tip       string `column:"tip" json:"tip"`             // 提示语,一般填写工具名称
	Position  int    `column:"position" json:"position"`   // 工具按钮位置信息 1:左侧 2:右侧
}

type UrInfo

type UrInfo struct {
	UserId int    `column:"user_id" json:"user_id"`
	OrgId  int    `column:"org_id" json:"org_id"`
	RoleId int    `column:"role_id" json:"role_id"`
	Name   string `column:"name" json:"name"`
}

type UserModel

type UserModel[T primary.Key] struct {
	Id         T      `column:"id" json:"id"`
	Account    string `column:"account" json:"account"`        // 账号
	Email      string `column:"email" json:"email"`            // 邮箱
	Phone      string `column:"phone" json:"phone"`            // 手机
	Password   string `column:"password" json:"password"`      // 密码
	Name       string `column:"name" json:"name"`              // 姓名
	Gender     string `column:"gender" json:"gender"`          // 性别
	Birth      string `column:"birth" json:"birth"`            // 出生
	Picture    string `column:"picture" json:"picture"`        // 头像
	CreatTime  string `column:"creat_time" json:"creatTime"`   // 创建时间
	UpdateTime string `column:"update_time" json:"updateTime"` // 更新时间
	OrgId      int    `column:"org_id" json:"orgId"`
	RoleId     int    `column:"role_id" json:"roleId"` // 默认角色
	Status     int    `column:"status" json:"status"`  // 用户状态 0:再用,1:停用,2:删除
}

Jump to

Keyboard shortcuts

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