-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathtypes.bal
81 lines (73 loc) · 1.46 KB
/
types.bal
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
type LoanRequest record {|
int loanRequestId;
int amount;
int period;
string branch;
string datetime;
string status;
string loanType;
|};
type LoanApproval record {|
int loanRequestId;
int loanId;
decimal interest;
decimal grantedAmount;
int period;
|};
type Loan record {|
readonly int loanRequestId;
int amount;
int period;
string branch;
LoanStatus status;
LoanType loanType;
string datetime;
DayOfWeek dayOfWeek;
string region;
string date;
decimal interest;
decimal grantedAmount;
int approvedPeriod;
LoanCatergotyByAmount loanCatergoryByAmount;
|};
type BranchPerformance record {|
readonly string id;
string branch;
LoanType loanType;
decimal totalGrants;
decimal totalInterest;
string date;
|};
type RegionPerformance record {|
readonly string id;
string region;
LoanType loanType;
string date;
DayOfWeek dayOfWeek;
decimal totalGrants;
decimal totalInterest;
|};
enum LoanType {
PERSONAL = "personal",
EDUCATIONAL = "educational",
HOUSING = "housing"
}
enum LoanStatus {
APPORVED = "approved",
PENDING = "pending",
REJECTED = "rejected"
}
enum LoanCatergotyByAmount {
SMALL_LOAN = "small",
MEDUIM_LOAN = "meduim",
LARGE_LOAN = "large"
}
enum DayOfWeek {
SUNDAY = "0",
MONDAY = "1",
TUESDAY = "2",
WEDNESDAY = "3",
THURSDAY = "4",
FRIDAY = "5",
SATURDAY = "6"
}