model

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const TableNameAdmin = "admin"
View Source
const TableNameAdminMenu = "admin_menu"
View Source
const TableNameAuthorized = "authorized"
View Source
const TableNameAuthorizedAPI = "authorized_api"
View Source
const TableNameCategory = "category"
View Source
const TableNameCronTask = "cron_task"
View Source
const TableNameMenu = "menu"
View Source
const TableNameMenuAction = "menu_action"
View Source
const TableNameSite = "site"

Variables

This section is empty.

Functions

This section is empty.

Types

type Admin

type Admin struct {
	ID          int64     `gorm:"column:id;primaryKey;autoIncrement:true;comment:主键" json:"id"`
	Username    string    `gorm:"column:username;not null;comment:用户名" json:"username"`
	Password    string    `gorm:"column:password;not null;comment:密码" json:"password"`
	Nickname    string    `gorm:"column:nickname;not null;comment:昵称" json:"nickname"`
	Mobile      string    `gorm:"column:mobile;not null;comment:手机号" json:"mobile"`
	IsUsed      int64     `gorm:"column:is_used;not null;default:1;comment:是否启用 1:是  -1:否" json:"is_used"`
	IsDeleted   int64     `gorm:"column:is_deleted;not null;default:-1;comment:是否删除 1:是  -1:否" json:"is_deleted"`
	CreatedAt   time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP;comment:创建时间" json:"created_at"`
	CreatedUser string    `gorm:"column:created_user;not null;comment:创建人" json:"created_user"`
	UpdatedAt   time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP;comment:更新时间" json:"updated_at"`
	UpdatedUser string    `gorm:"column:updated_user;not null;comment:更新人" json:"updated_user"`
}

Admin mapped from table <admin>

func (*Admin) TableName

func (*Admin) TableName() string

TableName Admin's table name

type AdminMenu

type AdminMenu struct {
	ID          int64     `gorm:"column:id;primaryKey;autoIncrement:true;comment:主键" json:"id"`
	AdminID     int64     `gorm:"column:admin_id;not null;comment:管理员ID" json:"admin_id"`
	MenuID      int64     `gorm:"column:menu_id;not null;comment:菜单栏ID" json:"menu_id"`
	CreatedAt   time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP;comment:创建时间" json:"created_at"`
	CreatedUser string    `gorm:"column:created_user;not null;comment:创建人" json:"created_user"`
}

AdminMenu mapped from table <admin_menu>

func (*AdminMenu) TableName

func (*AdminMenu) TableName() string

TableName AdminMenu's table name

type Authorized

type Authorized struct {
	ID                int64     `gorm:"column:id;primaryKey;autoIncrement:true;comment:主键" json:"id"`
	BusinessKey       string    `gorm:"column:business_key;not null;comment:调用方key" json:"business_key"`
	BusinessSecret    string    `gorm:"column:business_secret;not null;comment:调用方secret" json:"business_secret"`
	BusinessDeveloper string    `gorm:"column:business_developer;not null;comment:调用方对接人" json:"business_developer"`
	Remark            string    `gorm:"column:remark;not null;comment:备注" json:"remark"`
	IsUsed            int64     `gorm:"column:is_used;not null;default:1;comment:是否启用 1:是  -1:否" json:"is_used"`
	IsDeleted         int64     `gorm:"column:is_deleted;not null;default:-1;comment:是否删除 1:是  -1:否" json:"is_deleted"`
	CreatedAt         time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP;comment:创建时间" json:"created_at"`
	CreatedUser       string    `gorm:"column:created_user;not null;comment:创建人" json:"created_user"`
	UpdatedAt         time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP;comment:更新时间" json:"updated_at"`
	UpdatedUser       string    `gorm:"column:updated_user;not null;comment:更新人" json:"updated_user"`
}

Authorized mapped from table <authorized>

func (*Authorized) TableName

func (*Authorized) TableName() string

TableName Authorized's table name

type AuthorizedAPI

type AuthorizedAPI struct {
	ID          int64     `gorm:"column:id;primaryKey;autoIncrement:true;comment:主键" json:"id"`
	BusinessKey string    `gorm:"column:business_key;not null;comment:调用方key" json:"business_key"`
	Method      string    `gorm:"column:method;not null;comment:请求方式" json:"method"`
	API         string    `gorm:"column:api;not null;comment:请求地址" json:"api"`
	IsDeleted   int64     `gorm:"column:is_deleted;not null;default:-1;comment:是否删除 1:是  -1:否" json:"is_deleted"`
	CreatedAt   time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP;comment:创建时间" json:"created_at"`
	CreatedUser string    `gorm:"column:created_user;not null;comment:创建人" json:"created_user"`
	UpdatedAt   time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP;comment:更新时间" json:"updated_at"`
	UpdatedUser string    `gorm:"column:updated_user;not null;comment:更新人" json:"updated_user"`
}

AuthorizedAPI mapped from table <authorized_api>

func (*AuthorizedAPI) TableName

func (*AuthorizedAPI) TableName() string

TableName AuthorizedAPI's table name

type Category

type Category struct {
	ID        int64     `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	ParentID  int64     `gorm:"column:parent_id;not null" json:"parent_id"`
	Sort      int64     `gorm:"column:sort;not null;comment:排序" json:"sort"`
	Title     string    `gorm:"column:title;not null;comment:名称" json:"title"`
	Icon      string    `gorm:"column:icon;not null;comment:图标" json:"icon"`
	CreatedAt time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP;comment:创建时间" json:"created_at"`
	UpdatedAt time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP;comment:更新时间" json:"updated_at"`
	IsUsed    int64     `gorm:"column:is_used;default:-1;comment:是否启用 1:是 -1:否" json:"is_used"`
	Level     int64     `gorm:"column:level;comment:分类等级" json:"level"`
}

Category mapped from table <category>

func (*Category) TableName

func (*Category) TableName() string

TableName Category's table name

type CronTask

type CronTask struct {
	ID                  int64     `gorm:"column:id;primaryKey;autoIncrement:true;comment:主键" json:"id"`
	Name                string    `gorm:"column:name;not null;comment:任务名称" json:"name"`
	Spec                string    `gorm:"column:spec;not null;comment:crontab 表达式" json:"spec"`
	Command             string    `gorm:"column:command;not null;comment:执行命令" json:"command"`
	Protocol            int64     `gorm:"column:protocol;not null;default:1;comment:执行方式 1:shell 2:http" json:"protocol"`
	HTTPMethod          int64     `gorm:"column:http_method;not null;default:1;comment:http 请求方式 1:get 2:post" json:"http_method"`
	Timeout             int64     `gorm:"column:timeout;not null;default:60;comment:超时时间(单位:秒)" json:"timeout"`
	RetryTimes          int64     `gorm:"column:retry_times;not null;default:3;comment:重试次数" json:"retry_times"`
	RetryInterval       int64     `gorm:"column:retry_interval;not null;default:60;comment:重试间隔(单位:秒)" json:"retry_interval"`
	NotifyStatus        int64     `` /* 162-byte string literal not displayed */
	NotifyType          int64     `gorm:"column:notify_type;not null;default:1;comment:通知类型 1:邮件 2:webhook" json:"notify_type"`
	NotifyReceiverEmail string    `gorm:"column:notify_receiver_email;not null;comment:通知者邮箱地址(多个用,分割)" json:"notify_receiver_email"`
	NotifyKeyword       string    `gorm:"column:notify_keyword;not null;comment:通知匹配关键字(多个用,分割)" json:"notify_keyword"`
	Remark              string    `gorm:"column:remark;not null;comment:备注" json:"remark"`
	IsUsed              int64     `gorm:"column:is_used;not null;default:1;comment:是否启用 1:是  -1:否" json:"is_used"`
	CreatedAt           time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP;comment:创建时间" json:"created_at"`
	CreatedUser         string    `gorm:"column:created_user;not null;comment:创建人" json:"created_user"`
	UpdatedAt           time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP;comment:更新时间" json:"updated_at"`
	UpdatedUser         string    `gorm:"column:updated_user;not null;comment:更新人" json:"updated_user"`
}

CronTask mapped from table <cron_task>

func (*CronTask) TableName

func (*CronTask) TableName() string

TableName CronTask's table name

type Menu struct {
	ID          int64     `gorm:"column:id;primaryKey;autoIncrement:true;comment:主键" json:"id"`
	Pid         int64     `gorm:"column:pid;not null;comment:父类ID" json:"pid"`
	Name        string    `gorm:"column:name;not null;comment:菜单名称" json:"name"`
	Link        string    `gorm:"column:link;not null;comment:链接地址" json:"link"`
	Icon        string    `gorm:"column:icon;not null;comment:图标" json:"icon"`
	Level       int64     `gorm:"column:level;not null;default:1;comment:菜单类型 1:一级菜单 2:二级菜单" json:"level"`
	Sort        int64     `gorm:"column:sort;not null;comment:排序" json:"sort"`
	IsUsed      int64     `gorm:"column:is_used;not null;default:1;comment:是否启用 1:是 -1:否" json:"is_used"`
	IsDeleted   int64     `gorm:"column:is_deleted;not null;default:-1;comment:是否删除 1:是  -1:否" json:"is_deleted"`
	CreatedAt   time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP;comment:创建时间" json:"created_at"`
	CreatedUser string    `gorm:"column:created_user;not null;comment:创建人" json:"created_user"`
	UpdatedAt   time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP;comment:更新时间" json:"updated_at"`
	UpdatedUser string    `gorm:"column:updated_user;not null;comment:更新人" json:"updated_user"`
}

Menu mapped from table <menu>

func (*Menu) TableName() string

TableName Menu's table name

type MenuAction struct {
	ID          int64     `gorm:"column:id;primaryKey;autoIncrement:true;comment:主键" json:"id"`
	MenuID      int64     `gorm:"column:menu_id;not null;comment:菜单栏ID" json:"menu_id"`
	Method      string    `gorm:"column:method;not null;comment:请求方式" json:"method"`
	API         string    `gorm:"column:api;not null;comment:请求地址" json:"api"`
	IsDeleted   int64     `gorm:"column:is_deleted;not null;default:-1;comment:是否删除 1:是  -1:否" json:"is_deleted"`
	CreatedAt   time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP;comment:创建时间" json:"created_at"`
	CreatedUser string    `gorm:"column:created_user;not null;comment:创建人" json:"created_user"`
	UpdatedAt   time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP;comment:更新时间" json:"updated_at"`
	UpdatedUser string    `gorm:"column:updated_user;not null;comment:更新人" json:"updated_user"`
}

MenuAction mapped from table <menu_action>

func (*MenuAction) TableName() string

TableName MenuAction's table name

type Site

type Site struct {
	ID          int64     `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	CategoryID  int64     `gorm:"column:category_id;comment:分类id" json:"category_id"`
	Title       string    `gorm:"column:title;comment:网站标题" json:"title"`
	Thumb       string    `gorm:"column:thumb;comment:网站logo" json:"thumb"`
	Description string    `gorm:"column:description;comment:网站描述" json:"description"`
	URL         string    `gorm:"column:url;comment:网站地址" json:"url"`
	CreatedAt   time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP;comment:创建时间" json:"created_at"`
	UpdatedAt   time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP;comment:更新时间" json:"updated_at"`
	IsUsed      int64     `gorm:"column:is_used;default:-1;comment:是否使用" json:"is_used"`
	Category    Category  `gorm:"foreignKey:CategoryID" json:"category"`
}

Site mapped from table <site>

func (*Site) TableName

func (*Site) TableName() string

TableName Site's table name

Jump to

Keyboard shortcuts

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