26 lines
458 B
Go
26 lines
458 B
Go
package model
|
|
|
|
import "strings"
|
|
|
|
type Checkin struct {
|
|
Id int64
|
|
CorpId int64
|
|
Username string
|
|
Day string
|
|
Month string
|
|
Exception string
|
|
Rawdata string
|
|
StartTime int64
|
|
EndTime int64
|
|
CreateTime int64
|
|
UpdateTime int64
|
|
}
|
|
|
|
func (c *Checkin) IsCheckin() bool {
|
|
return c.EndTime > 0 && c.StartTime > 0 && c.EndTime > c.StartTime
|
|
}
|
|
|
|
func (c *Checkin) IsNormal() bool {
|
|
return strings.Trim(c.Exception, "\r\t\n ") == ""
|
|
}
|