Documentation ¶
Overview ¶
签到管理模块
Index ¶
Constants ¶
View Source
const ( SIGN_WEEK = iota + uint8(1) // 周签到[每天只允许签到一次] SIGN_MONTH // 月签到[每天只允许签到一次] SIGN_EVERY // 每日签到[每天只允许签到一次] SIGN_ONCE // 单次签到[入场签到] SIGN_TWICE // 双次签到[入场签到+离场签到] SIGN_WORK // 双次签到[入场签到+离场签到][每天允许签到两次] )
Variables ¶
This section is empty.
Functions ¶
func ResetPitch ¶
func ResetPitch()
重置批次信息标识 SIGN_WEEK = iota + uint8(1) // 周签到[每天只允许签到一次](每周一重置) SIGN_MONTH // 月签到[每天只允许签到一次](每月1号重置) SIGN_EVERY // 每日签到[每天只允许签到一次](每年1月1号重置) SIGN_ONCE // 单次签到[入场签到] SIGN_TWICE // 双次签到[入场签到+离场签到] SIGN_WORK // 双次签到[入场签到+离场签到][每天允许签到两次]
Types ¶
type SignHistory ¶
type SignHistory struct { Id uint64 `gorm:"column:id;type:bigint unsigned;primaryKey;autoIncrement;not null" form:"id" json:"id"` Uid uint `gorm:"column:uid;type:int unsigned;comment:用户ID" form:"uid" json:"uid"` //用户ID Sid uint `gorm:"column:sid;type:int unsigned;comment:批次ID" form:"sid" json:"sid"` //批次ID Ip uint `gorm:"column:ip;type:int unsigned;comment:IP地址,KVID" form:"ip" json:"ip"` //IP,KV表ID Ua uint `gorm:"column:ua;type:int unsigned;comment:UA头,KVID" form:"ua" json:"ua"` //UA头,KV表ID CreatedAt string `gorm:"column:created_at;type:datetime;comment:签到时间" form:"created_at" json:"created_at"` //签到时间 }
签到明细记录表
type SignType ¶
type SignType struct { Id uint `gorm:"column:id;type:int unsigned;primaryKey;autoIncrement;not null" form:"id" json:"id"` Uid uint `gorm:"column:uid;type:int unsigned;comment:创建人ID" form:"uid" json:"uid"` //创建人ID Type uint8 `gorm:"column:type;type:tinyint unsigned;comment:签到类型 xsign.SIGN_XXX类型" form:"type" json:"type"` //签到类型 xsign.SIGN_XXX类 型 Title string `gorm:"column:title;type:varchar(200);comment:签到批次标题" form:"title" json:"title"` //签到批次标题 Desc string `gorm:"column:desc;type:varchar(500);comment:签到批次描述" form:"desc" json:"desc"` //签到批次描述 Status uint8 `gorm:"column:status;type:tinyint unsigned;comment:批次状态" form:"status" json:"status"` //批次状态0-待审核 1-审核通过 2-审核拒绝 StartTime string `gorm:"column:start_time;type:datetime;comment:创建时间" form:"start_time" json:"start_time"` //开始时间 EndTime string `gorm:"column:end_time;type:datetime;comment:修改时间" form:"end_time" json:"end_time"` //结束时间 CreatedAt string `gorm:"column:created_at;type:datetime;comment:创建时间" form:"created_at" json:"created_at"` //创建时间 UpdatedAt string `gorm:"column:updated_at;type:datetime;comment:修改时间" form:"updated_at" json:"updated_at"` //修改时间 }
签到配置表
type SignUser ¶
type SignUser struct { Id uint `gorm:"column:id;type:int unsigned;primaryKey;autoIncrement;not null" form:"id" json:"id"` Uid uint `gorm:"column:uid;type:int unsigned;comment:签到用户ID" form:"uid" json:"uid"` //签到用户ID Sid uint `gorm:"column:sid;type:int unsigned;comment:签到批次ID" form:"sid" json:"sid"` //签到批次ID PreDate string `gorm:"column:pre_date;type:datetime;comment:上次签到时间" form:"pre_date" json:"pre_date"` //上次签到时间 PreOnce uint `gorm:"column:pre_once;type:int unsigned;comment:周期内累计签到次数" form:"pre_once" json:"pre_once"` //周期内累计签到次数 PreTwce uint `gorm:"column:pre_twce;type:int unsigned;comment:周期内连续签到次数" form:"pre_twce" json:"pre_twce"` //周期内连续签到次数 }
用户签到详情记录
Click to show internal directories.
Click to hide internal directories.