Documentation ¶
Index ¶
- type LoginLog
- type LoginLogBase
- func (LoginLogBase) BaseColumnNames() string
- func (LoginLogBase) BaseEntity() dbinfo.Entity
- func (LoginLogBase) GetDataInfo(name string) *dbinfo.DataInfo
- func (LoginLogBase) New() dbinfo.Entity
- func (LoginLogBase) OwnerName() string
- func (LoginLogBase) OwnerTable() string
- func (LoginLogBase) TableName() string
- type LoginLogController
- type LoginLogService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoginLog ¶
type LoginLog struct {
LoginLogBase
}
*
- 登录日志'LoginLog'表结构体
- 警告:非数据库字段禁止在此添加,应该创建扩展结构体中添加
- @author HuangXinBian
type LoginLogBase ¶
type LoginLogBase struct { GiId int64 `json:"iId" gorm:"column:iId; type:bigintAUTO_INCREMENT; NOT NULL; primary_key"` //记录编号 GsName string `json:"sName" gorm:"column:sName; type:varchar"` //日志类型(冗余) GiType int `json:"iType" gorm:"column:iType; type:int; NOT NULL; DEFAULT '1'"` //日志类型 GsUserId string `json:"sUserId" gorm:"column:sUserId; type:varchar"` //用户编号 GsUser string `json:"sUser" gorm:"column:sUser; type:varchar"` //用户名(冗余) GsIp string `json:"sIp" gorm:"column:sIp; type:varchar"` //IP地址 GsMACAddress string `json:"sMACAddress" gorm:"column:sMACAddress; type:varchar"` //MAC地址 GdLogDate time.Time `json:"dLogDate" gorm:"column:dLogDate; type:datetime"` //发生时间 GdLastCall time.Time `json:"dLastCall" gorm:"column:dLastCall; type:datetime"` //最后访问时间 GsMemo string `json:"sMemo" gorm:"column:sMemo; type:varchar"` //备注 GsCreator string `json:"sCreator" gorm:"column:sCreator; type:varchar; NOT NULL; DEFAULT '00000000'"` //创建者 GdCreateDate time.Time `json:"dCreateDate" gorm:"column:dCreateDate; type:datetime; NOT NULL"` //创建时间 GsModifieder string `json:"sModifieder" gorm:"column:sModifieder; type:varchar; NOT NULL; DEFAULT '00000000'"` //修改人 GdModifiedDate time.Time `json:"dModifiedDate" gorm:"column:dModifiedDate; type:datetime; NOT NULL"` //修改时间 GiState int `json:"iState" gorm:"column:iState; type:int; NOT NULL; DEFAULT '1'"` //状态 GiIndex int `json:"iIndex" gorm:"column:iIndex; type:int; NOT NULL; DEFAULT '1'"` //序号 GiVersion int `json:"iVersion" gorm:"column:iVersion; type:int; NOT NULL; DEFAULT '1'"` //版本号 }
*
- 登录日志'LoginLog'表结构体
- 警告:非数据库字段禁止在此添加,应该创建扩展结构体中添加
- @author HuangXinBian
func (LoginLogBase) BaseColumnNames ¶
func (LoginLogBase) BaseColumnNames() string
*
- 结构体映射表的字段名串
- @return
func (LoginLogBase) BaseEntity ¶
func (LoginLogBase) BaseEntity() dbinfo.Entity
*
- 取基础实体,用于在子类(嵌套结构体)时同样获得基类
func (LoginLogBase) GetDataInfo ¶
func (LoginLogBase) GetDataInfo(name string) *dbinfo.DataInfo
*
- 取数据结构信息
- @param name 字段名
- @return
func (LoginLogBase) OwnerName ¶
func (LoginLogBase) OwnerName() string
*
- 结构体映射库名,去除'Dev_'等前缀
- @return
func (LoginLogBase) TableName ¶
func (LoginLogBase) TableName() string
*
- 结构体映射表名,处理结构体名称与表名不一致的情况
- @return
type LoginLogController ¶
type LoginLogController struct { app.ControllerBaseFunc //通用控制层接口方法 ModuleEntity LoginLog //对应模块数据实体 ModuleService LoginLogService //对应模块业务实体 }
@Controller 登录日志控制器
func (LoginLogController) Del ¶
func (control LoginLogController) Del(ctx ginutil.Context) interface{}
#region @Api {title=删除数据} @param {name=iId dataType=int64 paramType=query explain=记录编号 required=true} @param {name=iVersion dataType=int paramType=query explain=版本号 required=true} @return {type=MsgEntity explain=返回影响数} @RequestMapping {name=Del type=POST value=/login/log/del} #endregion
func (LoginLogController) FindByPage ¶
func (control LoginLogController) FindByPage(ctx ginutil.Context) interface{}
#region @Api {title=查询分页数据} @param {name=data dataType=json paramType=body explain=FindByPageParam结构数据 explainType=FindByPageParam<LoginLog> required=true} @return {type=MsgEntity explain=返回分页数据} @RequestMapping {name=FindByPage type=POST value=/login/log/find/page} #endregion
type LoginLogService ¶
type LoginLogService struct {
app.ServiceBaseFunc
}
*
- 登录日志LoginLog表基本业务操作结构体
Click to show internal directories.
Click to hide internal directories.