-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.ts
64 lines (61 loc) · 1.5 KB
/
types.ts
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
53
54
55
56
57
58
59
60
61
62
63
64
export type User = {
id?: string,
username: string,
companyName?: string,
password?: string,
isAdmin: boolean,
license?: Date,
createdAt?: Date,
adminId?: string,
admin?: User,
companies?: User[]
}
// PK -> id
export type Employee = {
id?: string,
name?: string,
NRIC?: string,
dob?: Date,
nationality?: "SC" | "Foreigner" | "PR",
citizenshipStatus?: "SCPR2" | "SCPR1" | "SCPR3" | "Foreigner",
companyName?: string,
designation?: string,
ordinaryWage?: number,
additionalWage?: number,
allowance?: number,
otPay?: number,
otHours?: number,
modeOfPayment?: "Cheque" | "Cash" | "BankDeposit",
typeOfContributionRate?: "FG" | "GG" | "Foreigner",
joinDate?: Date,
resignDate?: Date,
isResigned?: boolean,
companyId?: string
}
// PK -> (monthYear, NRIC, companyName)
export type Payslip = {
id?: string,
employeeCPF: number,
employerCPF: number,
totalCPF: number,
other?: string,
otherDeduction?: number,
monthYear: string,
dateOfPayment?: Date,
ordinaryWage?: number,
allowance?: number,
additionalWage?: number,
otPay?: number,
otHours?: number,
modeOfPayment?: "Cheque" | "Cash" | "BankDeposit",
typeOfContributionRate?: "FG" | "GG" | "Foreigner",
name?: string,
NRIC?: string,
dob?: Date,
nationality?: string,
citizenshipStatus?: string,
companyName?: string,
designation?: string,
joinDate?: Date,
employeeId?: string
}