Skip to content

Classes modeling

Julian Pasquale edited this page Feb 8, 2021 · 2 revisions

The app has some classes to model the entities and relations for the business logic.

User

It represents a user of Venmo. Each user has a first_name, last_name and a unique email.

A user can add many friends, and it can be a friend of another user.

Every user has a payment_account associated, and also a list of transactions (known as payments). User can send and receive payments, so we need the ability to retrieve sended payments and/or received payments.

PaymentAccount

It represents a user account. Each user has a payment account, and a PaymentAccount belongs to only one user. This account models the user balance and is updated every time a payment is created.

Payment

This class models the transactions between friends. Users must be friends in order to be able to transfer money to each other. Every payment has a mandatory amount and an optional description.

Diagram

Classes diagram