-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommon.h
More file actions
55 lines (46 loc) · 860 Bytes
/
common.h
File metadata and controls
55 lines (46 loc) · 860 Bytes
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
#ifndef COMMON_H
#define COMMON_H
#define PORT 8080
#define BUFFER_SIZE 1024
#define DATA_DIR "data"
typedef struct {
int id;
char username[50];
char password[50];
double balance;
int active;
} Customer;
typedef struct {
int id;
char username[50];
char password[50];
} Employee;
typedef struct {
int id;
char username[50];
char password[50];
} Manager;
typedef struct {
int id;
char username[50];
char password[50];
} Admin;
typedef struct {
int customer_id;
char type[20];
double amount;
double balance_after;
char timestamp[50];
} Transaction;
typedef struct {
int loan_id;
int customer_id;
double amount;
char status[20];
int assigned_employee;
} Loan;
#define ROLE_CUSTOMER 1
#define ROLE_EMPLOYEE 2
#define ROLE_MANAGER 3
#define ROLE_ADMIN 4
#endif