-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstruct.go
More file actions
100 lines (83 loc) · 2.77 KB
/
struct.go
File metadata and controls
100 lines (83 loc) · 2.77 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
package UsersBackend
import (
"time"
)
type ResponseBack struct {
Status int `json:"status"`
Message string `json:"message"`
Data []string `json:"data"`
}
type ResponseEmployee struct {
Status int `json:"status"`
Message string `json:"message"`
Data Employee `json:"data"`
}
type Users struct {
Username string `json:"username" bson:"username"`
Password string `json:"password" bson:"password"`
PhoneNum string `json:"phone-num" bson:"phoneNum"`
Role string `json:"role,omitempty" bson:"role,omitempty"`
}
type Logindata struct {
Username string `json:"username" bson:"username"`
Password string `json:"password" bson:"password"`
}
type ResponseEmployeeBanyak struct {
Status int `json:"status"`
Message string `json:"message"`
Data []Employee `json:"data"`
}
type Employee struct {
EmployeeId string `json:"employeeid" bson:"employeeid,omitempty"`
Name string `json:"name" bson:"name,omitempty"`
Username string `json:"username" bson:"username"`
Email string `json:"email" bson:"email,omitempty"`
Phone string `json:"phone" bson:"phone,omitempty"`
Division Division `json:"division" bson:"division,omitempty"`
Salary Salary `json:"salary" bson:"salary"`
}
type Division struct {
DivId int `json:"divId" bson:"divId"`
DivName string `json:"divName" bson:"divName"`
}
type Updated struct {
Email string `json:"email" bson:"email"`
Phone string `json:"phone" bson:"phone"`
}
type Salary struct {
BasicSalary int `bson:"basic-salary" json:"basic-salary"`
HonorDivision int `bson:"honor-division" json:"honor-division"`
}
type Cred struct {
Status int `json:"status"`
Message string `json:"message"`
}
type ReqUsers struct {
Username string `json:"username"`
}
type RequestEmployee struct {
EmployeeId string `json:"employeeid"`
}
type Responses struct {
Response string `bson:"response" json:"response"`
}
type OTP struct {
Username string `json:"username" bson:"username"`
Role string `bson:"role" json:"role"`
DateOTP time.Time `json:"date-otp" bson:"date-otp"`
OTPCode string `bson:"otp-code" json:"otp-code"`
}
type OnlyOTP struct {
OTPCode string `bson:"otp-code" json:"otp-code"`
}
type WageCalc struct {
EmployeeName string `bson:"employeeName" json:"employeeName"`
JumlahCommit float64 `bson:"jumlahCommit" json:"jumlahCommit"`
BasicSalary float64 `bson:"basicSalary" json:"basicSalary"`
HonorDivision float64 `bson:"honorDivision" json:"honorDivision"`
InsentifCommits float64 `json:"insentifCommits" bson:"insentifCommits"`
GrossSalary float64 `bson:"jumlahKotor" json:"jumlahKotor"`
Tax float64 `json:"tax" bson:"tax"`
NettSalary float64 `bson:"nettSalary" json:"nettSalary"`
Month string `json:"month" bson:"month"`
}