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 ControlBy
- type DictData
- type DictType
- type Model
- type ModelTime
- type SysApi
- type SysConfig
- type SysDept
- type SysLoginLog
- type SysMenu
- type SysOperaLog
- type SysPost
- type SysRole
- type SysUser
- type TbxCountry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
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 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 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:请求方式"` 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:varchar(255);comment:请求参数"` Status string `json:"status" gorm:"type:varchar(4);comment:操作状态"` 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:8;"` SysDept []SysDept `` /* 128-byte string literal not displayed */ SysMenu *[]SysMenu `` /* 128-byte string literal not displayed */ ControlBy ModelTime }
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(20);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(20);comment:部门"` PostId int `json:"postId" gorm:"type:bigint(20);comment:岗位"` Remark string `json:"remark" gorm:"type:varchar(255);comment:备注"` Status string `json:"status" gorm:"type:varchar(4);comment:状态"` ControlBy ModelTime }
type TbxCountry ¶
type TbxCountry struct { Code string `json:"code" gorm:"size:4;column:code;primaryKey;comment:编码"` CName string `json:"cName" gorm:"size:64;unique;column:c_name;comment:中文名称"` EName string `json:"eName" gorm:"size:64;unique;column:e_name;comment:English Name"` EName2 string `json:"eName2" gorm:"size:64;column:e_name2;comment:English Name 2"` Code2 string `json:"code2" gorm:"size:4;unique;column:code2;comment:编码2"` Code3 string `json:"code3" gorm:"size:4;unique;column:code3;comment:编码3"` models.ControlBy models.ModelTime }
func (TbxCountry) TableName ¶
func (TbxCountry) TableName() string
Click to show internal directories.
Click to hide internal directories.