-
Notifications
You must be signed in to change notification settings - Fork 1
/
employee.go
52 lines (46 loc) · 1.95 KB
/
employee.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package goxerostructs
import "time"
//EmployeeResult is an employee result from xero
type EmployeeResult struct {
ID string `json:"ID"`
ProviderName string `json:"ProviderName"`
Status string `json:"Status"`
DateCreated time.Time `json:"DateCreated"`
Employees []Employee `json:"Employees"`
}
//Employee is an employee from xero
type Employee struct {
EmployeeID string `json:"EmployeeID"`
FirstName string `json:"FirstName"`
LastName string `json:"LastName"`
Status string `json:"Status"`
Email string `json:"Email"`
DateOfBirth string `json:"DateOfBirth"`
Gender string `json:"Gender"`
Phone string `json:"Phone"`
Mobile string `json:"Mobile"`
OrdinaryEarningsRateID string `json:"OrdinaryEarningsRateID"`
PayTemplate PayTemplate `json:"PayTemplate"`
}
//PayTemplate is an pay template from xero
type PayTemplate struct {
EarningsLines []EarningsLine `json:"EarningsLines"`
LeaveLines []LeaveLine `json:"LeaveLines"`
}
//EarningsLine is an earning line from xero
type EarningsLine struct {
EarningsRateID string `json:"EarningsRateID"`
CalculationType string `json:"CalculationType"`
AnnualSalary float64 `json:"AnnualSalary"`
RatePerUnit float64 `json:"RatePerUnit"`
NumberOfUnits float64 `json:"NormalNumberOfUnits"`
NumberOfUnitsPerWeek float64 `json:"NumberOfUnitsPerWeek"`
}
//LeaveLine is a leave line from xero
type LeaveLine struct {
LeaveTypeID string `json:"LeaveTypeID"`
CalculationType string `json:"CalculationType"`
AnnualNumberOfUnits float64 `json:"AnnualNumberOfUnits"`
FullTimeNumberOfUnitsPerPeriod float64 `json:"FullTimeNumberOfUnitsPerPeriod"`
EntitlementFinalPayPayoutType string `json:"EntitlementFinalPayPayoutType"`
}