Models

Our application uses several data models to represent different data types and their relationships

User

The User class represents an individual user of the application.

userID

private String userID

A unique identifier for each user.

name

private String name

The name of the user.

email

private String email

The email address of the user, used for authentication and communication.

password

private String password

The user's password, stored securely for authentication.

register

public static void register(User user) throws Exception

Registers a new user in the system, creating their account.

login

Authenticates a user using their user ID and password.

loginByEmail

Authenticates a user using their email address and password.

logout

Logs out the current user from the system.

updateProfile

Updates the user's profile information.

deleteUser

Deletes a user's account from the system.

Expense

The Expense class represents an individual expense record.

expenseID

A unique identifier for each expense.

userID

The ID of the user associated with this expense.

description

A description of the expense.

amount

The monetary amount of the expense.

dueDate

The due date for the expense, if applicable.

addExpense

Adds a new expense to the system.

editExpense

Edits an existing expense in the system.

deleteExpense

Deletes an expense from the system.

viewExpenses

Retrieves a list of all expenses for viewing.

Notification

The Notification class represents system notifications for users.

notificationID

A unique identifier for each notification.

userId

The ID of the user to whom this notification is sent.

message

The content of the notification message.

date

The date and time when the notification was created.

isRead

A flag indicating whether the notification has been read by the user.

sendNotification

Sends a new notification to a user.

markAsRead

Marks a notification as read by the user.

viewNotification

Retrieves a specific notification for viewing.

deleteNotification

Deletes a notification from the system.

Report

The Report class represents expense reports generated for users.

reportId

A unique identifier for each report.

userID

The ID of the user for whom this report is generated.

type

The type of report (e.g., monthly, yearly, category-wise).

generatedDate

The date when the report was generated.

generateExpenseReport

Generates an expense report for a specific user.

viewReport

Retrieves a report for viewing.

deleteReport

Deletes a report from the system.

Last updated