24 lines
1.9 KiB
Go
24 lines
1.9 KiB
Go
package dao
|
|
|
|
type LogInfo struct {
|
|
Id int64 `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT" json:"id"`
|
|
Content string `gorm:"column:content;type:text;comment:内容;NOT NULL" json:"content"`
|
|
ObjId int64 `gorm:"column:obj_id;type:int(11);comment:对象ID;NOT NULL" json:"obj_id"`
|
|
ObjType int32 `gorm:"column:obj_type;type:tinyint(1);comment:对象类型,1为职位,2为组,3为工人,4请假;NOT NULL" json:"obj_type"`
|
|
Type int32 `gorm:"column:type;type:tinyint(1);default:1;comment:类型,1为登录,2为登出,3修改,4为添加,5状态;NOT NULL" json:"type"`
|
|
IsStatistics string `gorm:"column:is_statistics;type:enum('1','2');default:2;comment:是否统计过,1为统计过,2为未统计" json:"is_statistics"`
|
|
AdminId int64 `gorm:"column:admin_id;type:int(11);default:0" json:"admin_id"`
|
|
AdminName string `gorm:"column:admin_name;type:varchar(50)" json:"admin_name"`
|
|
}
|
|
|
|
type LogCreate struct {
|
|
Id int64 `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT" json:"id"`
|
|
Content string `gorm:"column:content;type:text;comment:内容;NOT NULL" json:"content"`
|
|
ObjId int64 `gorm:"column:obj_id;type:int(11);comment:对象ID;NOT NULL" json:"obj_id"`
|
|
ObjType int32 `gorm:"column:obj_type;type:tinyint(1);comment:对象类型,1为职位,2为组,3为工人,4请假;NOT NULL" json:"obj_type"`
|
|
Type int32 `gorm:"column:type;type:tinyint(1);default:1;comment:类型,1为登录,2为登出,3修改,4为添加,5状态;NOT NULL" json:"type"`
|
|
IsStatistics string `gorm:"column:is_statistics;type:enum('1','2');default:2;comment:是否统计过,1为统计过,2为未统计" json:"is_statistics"`
|
|
AdminId int64 `gorm:"column:admin_id;type:int(11);default:0" json:"admin_id"`
|
|
AdminName string `gorm:"column:admin_name;type:varchar(50)" json:"admin_name"`
|
|
}
|