Documentation ¶
Index ¶
- func ExecSql(db *gorm.DB, filePath string) error
- func InitDb(db *gorm.DB) (err error)
- func Ioutil(filePath string) (string, error)
- type BaseModel
- type CasbinRule
- type ControlBy
- type DictData
- type DictType
- type Model
- type ModelTime
- type SysApi
- type SysColumns
- type SysConfig
- type SysDept
- type SysJob
- type SysLoginLog
- type SysMenu
- type SysOperaLog
- type SysPost
- type SysRole
- type SysRoleDept
- type SysTables
- type SysUser
- type TbDemo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CasbinRule ¶
type CasbinRule struct { ID uint `gorm:"primaryKey;autoIncrement"` Ptype string `gorm:"size:512;uniqueIndex:unique_index"` V0 string `gorm:"size:512;uniqueIndex:unique_index"` V1 string `gorm:"size:512;uniqueIndex:unique_index"` V2 string `gorm:"size:512;uniqueIndex:unique_index"` V3 string `gorm:"size:512;uniqueIndex:unique_index"` V4 string `gorm:"size:512;uniqueIndex:unique_index"` V5 string `gorm:"size:512;uniqueIndex:unique_index"` }
CasbinRule sys_casbin_rule
func (CasbinRule) TableName ¶
func (CasbinRule) TableName() string
type DictData ¶
type DictData struct { DictCode int `gorm:"primaryKey;autoIncrement;" json:"dictCode" example:"1"` //字典编码 DictSort int `gorm:"" json:"dictSort"` //显示顺序 DictLabel string `gorm:"size:128;" json:"dictLabel"` //数据标签 DictValue string `gorm:"size:255;" json:"dictValue"` //数据键值 DictType string `gorm:"size:64;" json:"dictType"` //字典类型 CssClass string `gorm:"size:128;" json:"cssClass"` // ListClass string `gorm:"size:128;" json:"listClass"` // IsDefault string `gorm:"size:8;" json:"isDefault"` // Status int `gorm:"size:4;" json:"status"` //状态 Default string `gorm:"size:8;" json:"default"` // Remark string `gorm:"size:255;" json:"remark"` //备注 ControlBy ModelTime }
type DictType ¶
type DictType struct { DictId int `gorm:"primaryKey;autoIncrement;" json:"dictId"` DictName string `gorm:"size:128;" json:"dictName"` //字典名称 DictType string `gorm:"size:128;" json:"dictType"` //字典类型 Status int `gorm:"size:4;" json:"status"` //状态 Remark string `gorm:"size:255;" json:"remark"` //备注 ControlBy ModelTime }
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:请求类型"` ModelTime ControlBy }
type SysColumns ¶
type SysColumns struct { ColumnId int `gorm:"primaryKey;autoIncrement" json:"columnId"` TableId int `gorm:"" json:"tableId"` ColumnName string `gorm:"size:128;" json:"columnName"` ColumnComment string `gorm:"column:column_comment;size:128;" json:"columnComment"` ColumnType string `gorm:"column:column_type;size:128;" json:"columnType"` GoType string `gorm:"column:go_type;size:128;" json:"goType"` GoField string `gorm:"column:go_field;size:128;" json:"goField"` JsonField string `gorm:"column:json_field;size:128;" json:"jsonField"` IsPk string `gorm:"column:is_pk;size:4;" json:"isPk"` IsIncrement string `gorm:"column:is_increment;size:4;" json:"isIncrement"` IsRequired string `gorm:"column:is_required;size:4;" json:"isRequired"` IsInsert string `gorm:"column:is_insert;size:4;" json:"isInsert"` IsEdit string `gorm:"column:is_edit;size:4;" json:"isEdit"` IsList string `gorm:"column:is_list;size:4;" json:"isList"` IsQuery string `gorm:"column:is_query;size:4;" json:"isQuery"` QueryType string `gorm:"column:query_type;size:128;" json:"queryType"` HtmlType string `gorm:"column:html_type;size:128;" json:"htmlType"` DictType string `gorm:"column:dict_type;size:128;" json:"dictType"` Sort int `gorm:"column:sort;" json:"sort"` List string `gorm:"column:list;size:1;" json:"list"` Pk bool `gorm:"column:pk;size:1;" json:"pk"` Required bool `gorm:"column:required;size:1;" json:"required"` SuperColumn bool `gorm:"column:super_column;size:1;" json:"superColumn"` UsableColumn bool `gorm:"column:usable_column;size:1;" json:"usableColumn"` Increment bool `gorm:"column:increment;size:1;" json:"increment"` Insert bool `gorm:"column:insert;size:1;" json:"insert"` Edit bool `gorm:"column:edit;size:1;" json:"edit"` Query bool `gorm:"column:query;size:1;" json:"query"` Remark string `gorm:"column:remark;size:255;" json:"remark"` FkTableName string `gorm:"" json:"fkTableName"` FkTableNameClass string `gorm:"" json:"fkTableNameClass"` FkTableNamePackage string `gorm:"" json:"fkTableNamePackage"` FkLabelId string `gorm:"" json:"fkLabelId"` FkLabelName string `gorm:"size:255;" json:"fkLabelName"` ModelTime ControlBy }
func (SysColumns) TableName ¶
func (SysColumns) TableName() string
type SysConfig ¶
type SysConfig struct { Model ConfigName string `json:"configName" gorm:"type:varchar(128);comment:ConfigName"` ConfigKey string `json:"configKey" gorm:"type:varchar(128);comment:ConfigKey"` ConfigValue string `json:"configValue" gorm:"type:varchar(255);comment:ConfigValue"` ConfigType string `json:"configType" gorm:"type:varchar(64);comment:ConfigType"` IsFrontend int `json:"isFrontend" gorm:"type:varchar(64);comment:是否前台"` Remark string `json:"remark" gorm:"type:varchar(128);comment:Remark"` ControlBy ModelTime }
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;"` //状态 ControlBy ModelTime }
type SysJob ¶
type SysJob struct { JobId int `json:"jobId" gorm:"primaryKey;autoIncrement"` // 编码 JobName string `json:"jobName" gorm:"size:255;"` // 名称 JobGroup string `json:"jobGroup" gorm:"size:255;"` // 任务分组 JobType int `json:"jobType" gorm:"size:1;"` // 任务类型 CronExpression string `json:"cronExpression" gorm:"size:255;"` // cron表达式 InvokeTarget string `json:"invokeTarget" gorm:"size:255;"` // 调用目标 Args string `json:"args" gorm:"size:255;"` // 目标参数 MisfirePolicy int `json:"misfirePolicy" gorm:"size:255;"` // 执行策略 Concurrent int `json:"concurrent" gorm:"size:1;"` // 是否并发 Status int `json:"status" gorm:"size:1;"` // 状态 EntryId int `json:"entry_id" gorm:"size:11;"` // job启动时返回的id ModelTime ControlBy }
type SysLoginLog ¶
type SysLoginLog struct { Model Username string `json:"username" gorm:"type:varchar(128);comment:用户名"` Status string `json:"status" gorm:"type:varchar(4);comment:状态"` Ipaddr string `json:"ipaddr" gorm:"type:varchar(255);comment:ip地址"` LoginLocation string `json:"loginLocation" gorm:"type:varchar(255);comment:归属地"` Browser string `json:"browser" gorm:"type:varchar(255);comment:浏览器"` Os string `json:"os" gorm:"type:varchar(255);comment:系统"` Platform string `json:"platform" gorm:"type:varchar(255);comment:固件"` LoginTime time.Time `json:"loginTime" gorm:"type:timestamp;comment:登录时间"` Remark string `json:"remark" gorm:"type:varchar(255);comment:备注"` Msg string `json:"msg" gorm:"type:varchar(255);comment:信息"` CreatedAt time.Time `json:"createdAt" gorm:"comment:创建时间"` UpdatedAt time.Time `json:"updatedAt" gorm:"comment:最后更新时间"` 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"` ControlBy ModelTime }
type SysOperaLog ¶
type SysOperaLog struct { Model Title string `json:"title" gorm:"type:varchar(255);comment:操作模块"` BusinessType string `json:"businessType" gorm:"type:varchar(128);comment:操作类型"` BusinessTypes string `json:"businessTypes" gorm:"type:varchar(128);comment:BusinessTypes"` Method string `json:"method" gorm:"type:varchar(128);comment:函数"` RequestMethod string `json:"requestMethod" gorm:"type:varchar(128);comment:请求方式: GET POST PUT DELETE"` OperatorType string `json:"operatorType" gorm:"type:varchar(128);comment:操作类型"` OperName string `json:"operName" gorm:"type:varchar(128);comment:操作者"` DeptName string `json:"deptName" gorm:"type:varchar(128);comment:部门名称"` OperUrl string `json:"operUrl" gorm:"type:varchar(255);comment:访问地址"` OperIp string `json:"operIp" gorm:"type:varchar(128);comment:客户端ip"` OperLocation string `json:"operLocation" gorm:"type:varchar(128);comment:访问位置"` OperParam string `json:"operParam" gorm:"type:text;comment:请求参数"` Status string `json:"status" gorm:"type:varchar(4);comment:操作状态 1:正常 2:关闭"` OperTime time.Time `json:"operTime" gorm:"type:timestamp;comment:操作时间"` JsonResult string `json:"jsonResult" gorm:"type:varchar(255);comment:返回数据"` Remark string `json:"remark" gorm:"type:varchar(255);comment:备注"` LatencyTime string `json:"latencyTime" gorm:"type:varchar(128);comment:耗时"` UserAgent string `json:"userAgent" gorm:"type:varchar(255);comment:ua"` CreatedAt time.Time `json:"createdAt" gorm:"comment:创建时间"` UpdatedAt time.Time `json:"updatedAt" gorm:"comment:最后更新时间"` 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"` //描述 ControlBy ModelTime }
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:128;"` SysMenu []SysMenu `` /* 128-byte string literal not displayed */ ControlBy ModelTime }
type SysRoleDept ¶
type SysRoleDept struct { RoleId int `gorm:"size:11;primaryKey"` DeptId int `gorm:"size:11;primaryKey"` }
func (SysRoleDept) TableName ¶
func (SysRoleDept) TableName() string
type SysTables ¶
type SysTables struct { TableId int `gorm:"primaryKey;autoIncrement" json:"tableId"` //表编码 TBName string `gorm:"column:table_name;size:255;" json:"tableName"` //表名称 TableComment string `gorm:"size:255;" json:"tableComment"` //表备注 ClassName string `gorm:"size:255;" json:"className"` //类名 TplCategory string `gorm:"size:255;" json:"tplCategory"` // PackageName string `gorm:"size:255;" json:"packageName"` //包名 ModuleName string `gorm:"size:255;" json:"moduleName"` //go文件名 ModuleFrontName string `gorm:"size:255;comment:前端文件名;" json:"moduleFrontName"` //前端文件名 BusinessName string `gorm:"size:255;" json:"businessName"` // FunctionName string `gorm:"size:255;" json:"functionName"` //功能名称 FunctionAuthor string `gorm:"size:255;" json:"functionAuthor"` //功能作者 PkColumn string `gorm:"size:255;" json:"pkColumn"` PkGoField string `gorm:"size:255;" json:"pkGoField"` PkJsonField string `gorm:"size:255;" json:"pkJsonField"` Options string `gorm:"size:255;" json:"options"` TreeCode string `gorm:"size:255;" json:"treeCode"` TreeParentCode string `gorm:"size:255;" json:"treeParentCode"` TreeName string `gorm:"size:255;" json:"treeName"` Tree bool `gorm:"size:1;default:0;" json:"tree"` Crud bool `gorm:"size:1;default:1;" json:"crud"` Remark string `gorm:"size:255;" json:"remark"` IsDataScope int `gorm:"size:1;" json:"isDataScope"` IsActions int `gorm:"size:1;" json:"isActions"` IsAuth int `gorm:"size:1;" json:"isAuth"` IsLogicalDelete string `gorm:"size:1;" json:"isLogicalDelete"` LogicalDelete bool `gorm:"size:1;" json:"logicalDelete"` LogicalDeleteColumn string `gorm:"size:128;" json:"logicalDeleteColumn"` ModelTime ControlBy }
type SysUser ¶
type SysUser struct { UserId int `gorm:"primaryKey;autoIncrement;comment:编码" json:"userId"` Username string `json:"username" gorm:"type:varchar(64);comment:用户名"` Password string `json:"-" gorm:"type:varchar(128);comment:密码"` NickName string `json:"nickName" gorm:"type:varchar(128);comment:昵称"` Phone string `json:"phone" gorm:"type:varchar(11);comment:手机号"` RoleId int `json:"roleId" gorm:"type:bigint;comment:角色ID"` Salt string `json:"-" gorm:"type:varchar(255);comment:加盐"` Avatar string `json:"avatar" gorm:"type:varchar(255);comment:头像"` Sex string `json:"sex" gorm:"type:varchar(255);comment:性别"` Email string `json:"email" gorm:"type:varchar(128);comment:邮箱"` DeptId int `json:"deptId" gorm:"type:bigint;comment:部门"` PostId int `json:"postId" gorm:"type:bigint;comment:岗位"` Remark string `json:"remark" gorm:"type:varchar(255);comment:备注"` Status string `json:"status" gorm:"type:varchar(4);comment:状态"` ControlBy ModelTime }
Click to show internal directories.
Click to hide internal directories.