structs

package
v0.0.0-...-a3795ca Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AiApiKey

type AiApiKey struct {
	Model
	Name   string `json:"name" gorm:"type:varchar(100);unique;comment:名称"`
	Type   string `json:"type" gorm:"type:varchar(20);comment:类型 暂时只支持Openai"`
	ApiKey string `json:"apiKey" gorm:"type:varchar(200);unique;comment:ApiKey"`
}

func (AiApiKey) TableName

func (AiApiKey) TableName() string

type AiApiKeyApi

type AiApiKeyApi struct {
	Model
	Name string `json:"name"`
	Type string `json:"type"`
}

type Any

type Any interface{}

type Claims

type Claims struct {
	UserName  string `json:"userName"`
	UserId    int    `json:"userId"`
	UserRoles string `json:"userRoles"`
	jwt.StandardClaims
}

type H

type H map[string]interface{}
type Menu struct {
	Model
	Pid  int    `json:"pid" gorm:"type:bigint;comment:父级id 0为根节点"`
	Name string `json:"name" gorm:"type:varchar(100);comment:名称"`
	Type int    `json:"type" gorm:"type:tinyint;comment:类型 0菜单 1权限"`
	Sign string `json:"sign" gorm:"type:varchar(100);comment:标识"`
}
func (Menu) TableName() string

type Model

type Model struct {
	Id        int            `json:"id" gorm:"type:bigint"`
	CreatedAt time.Time      `json:"createdAt" gorm:"type:timestamp"`
	CreatedBy string         `json:"createdBy" gorm:"type:varchar(100)"`
	UpdatedAt time.Time      `json:"updatedAt" gorm:"type:timestamp"`
	UpdatedBy string         `json:"updatedBy" gorm:"type:varchar(100)"`
	DeletedAt gorm.DeletedAt `json:"deletedAt" gorm:"type:timestamp"`
	DeletedBy string         `json:"deletedBy" gorm:"type:varchar(100)"`
}

type Pager

type Pager struct {
	PageSize    int `json:"pageSize" form:"pageSize" validate:"required"`
	CurrentPage int `json:"currentPage" form:"currentPage" validate:"required"`
}

type Response

type Response struct {
	Success bool        `json:"success"`
	Data    interface{} `json:"data"`
	Message string      `json:"message"`
	ErrNo   int         `json:"errNo"`
}

type Role

type Role struct {
	Model
	Name  string `json:"name" gorm:"type:varchar(100);comment:角色名称"`
	Menus string `json:"menus" gorm:"type:varchar(500);comment:授权的菜单和权限"`
	Desc  string `json:"desc" gorm:"type:varchar(100);comment:描述"`
}

func (Role) TableName

func (Role) TableName() string

type User

type User struct {
	Model
	UserName string `json:"userName" gorm:"type:varchar(100);comment:用户名"`
	Password string `json:"password" gorm:"type:varchar(100);comment:密码加密串"`
	RoleIds  string `json:"roleIds" gorm:"type:varchar(100);comment:角色id集 使用,分隔"`
	Email    string `json:"email" gorm:"type:varchar(100)"`
	Phone    string `json:"phone" gorm:"type:varchar(100)"`
}

func (User) TableName

func (u User) TableName() string

type UserApi

type UserApi struct {
	Model
	UserName string `json:"userName"`
	RoleIds  string `json:"roleIds"`
	Email    string `json:"email"`
	Phone    string `json:"phone"`
}

Jump to

Keyboard shortcuts

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