77 lines
3.6 KiB
Go
77 lines
3.6 KiB
Go
package models
|
|
|
|
import "time"
|
|
|
|
const (
|
|
OaAttendMatchUnknown int8 = 0
|
|
OaAttendMatchOK int8 = 1
|
|
OaAttendMatchMissing int8 = 2
|
|
)
|
|
|
|
const (
|
|
OaAttendClockNone int8 = 0
|
|
OaAttendClockNormal int8 = 1
|
|
OaAttendClockLate int8 = 2
|
|
OaAttendClockNoShift int8 = 3
|
|
OaAttendClockOffTime int8 = 4
|
|
)
|
|
|
|
const (
|
|
OaAttendSourceApp int8 = 1
|
|
OaAttendSourceWeb int8 = 2
|
|
)
|
|
|
|
const (
|
|
OaAttendFixNone int8 = 0
|
|
OaAttendFixRunning int8 = 1
|
|
OaAttendFixApproved int8 = 2
|
|
OaAttendFixRejected int8 = 3
|
|
OaAttendFixWithdrawn int8 = 4
|
|
)
|
|
|
|
const (
|
|
OaAttendFixTypeIn int8 = 1
|
|
OaAttendFixTypeOut int8 = 2
|
|
)
|
|
|
|
type OaAttendance struct {
|
|
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
|
Tid int `orm:"column(tid)" json:"tid"`
|
|
Uid uint64 `orm:"column(uid);default(0)" json:"uid"`
|
|
EmployeeID uint `orm:"column(employee_id);default(0)" json:"employee_id"`
|
|
EmployeeName string `orm:"column(employee_name);size(50);default()" json:"employee_name"`
|
|
EmployeeAccount string `orm:"column(employee_account);size(50);default()" json:"employee_account"`
|
|
OrgID uint64 `orm:"column(org_id);default(0)" json:"org_id"`
|
|
OrgName string `orm:"column(org_name);size(128);default()" json:"org_name"`
|
|
Position string `orm:"column(position);size(50);default()" json:"position"`
|
|
AttendDate string `orm:"column(attend_date);type(date)" json:"attend_date"`
|
|
EntryID uint64 `orm:"column(entry_id);default(0)" json:"entry_id"`
|
|
ShiftID uint64 `orm:"column(shift_id);default(0)" json:"shift_id"`
|
|
ShiftName string `orm:"column(shift_name);size(50);default()" json:"shift_name"`
|
|
ShortName string `orm:"column(short_name);size(20);default()" json:"short_name"`
|
|
Color string `orm:"column(color);size(20);default(#409EFF)" json:"color"`
|
|
WorkStart string `orm:"column(work_start);size(8);default()" json:"work_start"`
|
|
WorkEnd string `orm:"column(work_end);size(8);default()" json:"work_end"`
|
|
MatchStatus int8 `orm:"column(match_status);default(0)" json:"match_status"`
|
|
ClockInTime *time.Time `orm:"column(clock_in_time);type(datetime);null" json:"clock_in_time"`
|
|
ClockInStatus int8 `orm:"column(clock_in_status);default(0)" json:"clock_in_status"`
|
|
ClockInNote string `orm:"column(clock_in_note);size(255);default()" json:"clock_in_note"`
|
|
ClockOutTime *time.Time `orm:"column(clock_out_time);type(datetime);null" json:"clock_out_time"`
|
|
ClockOutStatus int8 `orm:"column(clock_out_status);default(0)" json:"clock_out_status"`
|
|
ClockOutNote string `orm:"column(clock_out_note);size(255);default()" json:"clock_out_note"`
|
|
Location string `orm:"column(location);size(255);default()" json:"location"`
|
|
Remark string `orm:"column(remark);size(255);default()" json:"remark"`
|
|
Source int8 `orm:"column(source);default(1)" json:"source"`
|
|
FixStatus int8 `orm:"column(fix_status);default(0)" json:"fix_status"`
|
|
FixType int8 `orm:"column(fix_type);default(0)" json:"fix_type"`
|
|
FixInstanceID uint64 `orm:"column(fix_instance_id);default(0)" json:"fix_instance_id"`
|
|
FixTime string `orm:"column(fix_time);size(8);default()" json:"fix_time"`
|
|
FixReason string `orm:"column(fix_reason);size(255);default()" json:"fix_reason"`
|
|
CreateTime time.Time `orm:"column(create_time);auto_now_add;type(datetime)" json:"create_time"`
|
|
UpdateTime *time.Time `orm:"column(update_time);auto_now;type(datetime);null" json:"update_time"`
|
|
}
|
|
|
|
func (m *OaAttendance) TableName() string {
|
|
return "yz_backend_oa_attendance"
|
|
}
|