entity

package
v0.0.0-...-d62a2a9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseModel

type BaseModel struct {
	ID        uint           `gorm:"primaryKey" json:"id"`
	CreatedAt time.Time      `json:"created_at"`
	UpdatedAt time.Time      `json:"updated_at"`
	DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
}

type Config

type Config struct {
	BaseModel
	Name   string      `json:"name" gorm:"column:name;comment:key;uniqueIndex:key_name;type:varchar(64);NOT NULL;"`
	Value  interface{} `json:"value" gorm:"column:value;comment:value;type:varchar(255);"`
	Status int         `json:"status" form:"status" gorm:"column:status;default:1;comment:状态;type:tinyint(3);"`
}

Config 配置字典

func (Config) TableName

func (Config) TableName() string

type Crontab

type Crontab struct {
	BaseModel
	CrontabTime time.Time `json:"crontab_time" gorm:"column:crontab_time;comment:定时发布时间;"`
	//Status      int       `json:"status" form:"status" gorm:"column:status;comment:状态;size:1;"`
	ArticleId uint `json:"-" gorm:"column:article_id;comment:文章id;size:32;"`
	NoticeId  uint `json:"-" gorm:"column:notice_id;comment:通知id;size:32;"`
}

type Id

type Id struct {
	Id int `json:"id" gorm:"id"`
}

type Role

type Role struct {
	BaseModel
	Name   string `json:"name" gorm:"column:name;comment:名称;type:varchar(64);NOT NULL;"`
	Status int    `json:"status" form:"status" gorm:"column:status;default:1;comment:状态;type:tinyint(3);"`
}

Role 角色表

func (Role) TableName

func (Role) TableName() string

type Statistic

type Statistic struct {
	BaseModel
	Key   string `json:"key" form:"key" gorm:"column:key;comment:键;type:varchar(32);index:key_name;NOT NULL;"`
	Value string `json:"value" form:"value" gorm:"column:value;comment:值;type:int(11);"`
}

Statistic 结构体

func (Statistic) TableName

func (Statistic) TableName() string

TableName Category 表名

type SysLog

type SysLog struct {
	BaseModel
	Username    string `json:"username" gorm:"column:username;comment:用户名;type:varchar(64);"`
	Content     string `json:"content" gorm:"column:content;comment:操作内容;type:varchar(255)"`
	RequestData string `json:"request_data" gorm:"column:request_data;comment:接口请求参数;"`
	ClientIP    string `json:"client_ip" gorm:"column:client_ip;comment:客户端ip;type:varchar(15)"`
	Result      int    `json:"result"  gorm:"column:result;default:1;comment:状态,1成功2失败;type:tinyint(3);"`
	Category    int    `json:"category"  gorm:"column:category;default:1;comment:状态,1操作日志2系统日志;type:tinyint(3);"`
}

SysLog 操作日志表

func (SysLog) TableName

func (SysLog) TableName() string

type User

type User struct {
	ID            uint                  `gorm:"primaryKey" json:"id"`
	Name          string                `json:"name" gorm:"column:name;comment:用户名;uniqueIndex:user_name;type:varchar(64);NOT NULL;"`
	NickName      string                `json:"nick_name" gorm:"column:nick_name;comment:昵称;type:varchar(64);NOT NULL;"`
	RoleId        int                   `json:"role_id" gorm:"column:role_id;comment:角色类型;type:tinyint(3);" `
	Password      string                `json:"-"  gorm:"column:password;comment:密码;type:varchar(64);"`
	Token         string                `json:"token"  gorm:"column:token;comment:令牌;type:varchar(255);"`
	UserSerialNum string                `json:"user_serial_num"  gorm:"column:user_serial_num;index:user_serial_num;comment:ukey序列号;type:varchar(255);"`
	UserPub       string                `json:"-"  gorm:"column:user_pub;comment:ukey签名公钥,与签名证书里的公钥一致;type:varchar(255);"`
	CertSerialNum string                `json:"-"  gorm:"column:cert_serial_num;comment:签名证书序列号;type:varchar(255);"`
	Status        int                   `json:"status" form:"status" gorm:"column:status;default:1;comment:状态;type:tinyint(3);"`
	CreatedAt     time.Time             `json:"created_at"`
	UpdatedAt     time.Time             `json:"updated_at"`
	DeletedAt     soft_delete.DeletedAt `gorm:"uniqueIndex:user_name" json:"-"`
}

User 用户表

func (User) TableName

func (User) TableName() string

type UserTokenInfo

type UserTokenInfo struct {
	Id     uint   `json:"id"`
	Name   string `json:"name"`
	RoleId int    `json:"role_id"`
}

Jump to

Keyboard shortcuts

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