Documentation
¶
Index ¶
Constants ¶
View Source
const DEFAULT_TIME_FORMAT = "15:04"
View Source
const DEFAULT_TOLERANCE = 30
Variables ¶
View Source
var CronScheduledMap map[string]cron.EntryID
Functions ¶
This section is empty.
Types ¶
type BaseResponse ¶
type DayOff ¶
type DayOff struct { ID string `gorm:"primaryKey;type:varchar(100)" json:"-"` UserID string `gorm:"type:varchar(100);not null" json:"user_id"` Year int `json:"year"` Month int `json:"month"` Date int `json:"date"` CreatedAt time.Time `json:"-"` UpdatedAt time.Time `json:"-"` DeletedAt gorm.DeletedAt `json:"-"` }
type Expression ¶ added in v1.1.2
type LoginRequest ¶
type LoginResponse ¶
type LoginResponse struct { BaseResponse Result LoginResult `json:"result"` }
type LoginResult ¶
type PunchResponse ¶
type PunchResponse struct { BaseResponse Result PunchResult `json:"result"` }
type PunchResult ¶
type PunchUsecase ¶
type Schedule ¶ added in v1.1.2
type Schedule struct { ID string `gorm:"primaryKey;type:varchar(100)" json:"-"` PunchIn string `gorm:"embedded" json:"punch_in"` PunchOut string `gorm:"embedded" json:"punch_out"` CreatedAt time.Time `json:"-"` UpdatedAt time.Time `json:"-"` DeletedAt gorm.DeletedAt `json:"-"` // belongs to user UserID string `gorm:"type:varchar(100);not null" json:"user_id"` User User `json:"-"` }
func (*Schedule) BeforeCreate ¶ added in v1.1.2
BeforeCreate will set snowflake id rather than numeric id.
func (*Schedule) GetCronEntry ¶ added in v1.1.2
func (*Schedule) GetCronEntryKey ¶ added in v1.1.2
func (*Schedule) GetCronExpression ¶ added in v1.1.2
func (s *Schedule) GetCronExpression() Expression
type User ¶
type User struct { ID string `gorm:"primaryKey;type:varchar(100)" json:"-"` Name string `gorm:"type:varchar(100)" json:"name"` Account string `gorm:"type:varchat(100);not null" json:"account"` Password string `gorm:"type:varchar(255);not null" json:"password"` DiscordUserID string `gorm:"type:varchar(255);not null" json:"discord_user_id"` IsEnable bool `gorm:"index" json:"-"` Role enums.RoleType `gorm:"type:int" json:"role"` CreatedAt time.Time `json:"-"` UpdatedAt time.Time `json:"-"` DeletedAt gorm.DeletedAt `json:"-"` }
Click to show internal directories.
Click to hide internal directories.