Code Monkey home page Code Monkey logo

chaldal.api's Introduction

a eCommerce web API

##Database design

UML_eCom

Relationships between Models

The provided diagram is a Unified Modeling Language (UML) class diagram representing the relationships between various entities in a sample e-commerce application. Let's describe the relationships:

  1. Inheritance Relationships:

    • UserBase inherits from BaseEntity: UserBase class inherits the properties of BaseEntity class, which includes properties like IsDeleted, CreatedBy, CreatedDate, UpdatedBy, and UpdatedDate. This allows UserBase, Admin, and Customer to have those common properties.

    • Admin inherits from UserBase: Admin class is a specialization of UserBase and inherits the properties Username, PasswordHash, and Email, along with the common properties from BaseEntity.

    • Customer inherits from UserBase: Customer class is another specialization of UserBase and inherits the properties Username, PasswordHash, and Email, along with the common properties from BaseEntity.

  2. Association Relationships:

    • Customer "1" -- "N" Review: A Customer can have multiple Reviews (one-to-many relationship), while a Review is associated with only one Customer.

    • Product "1" -- "N" Review: A Product can have multiple Reviews (one-to-many relationship), while a Review is associated with only one Product.

    • Product "1" -- "N" Stock: A Product can have multiple Stock entries (one-to-many relationship), while a Stock entry is associated with only one Product.

    • Product "N" -- "1" Category: A Product belongs to one Category, while a Category can have multiple Products (many-to-one relationship).

    • CartItem "1" -- "1" Product: A CartItem is associated with one Product, and a Product can be associated with only one CartItem (one-to-one relationship).

    • CartItem "1" -- "1" Customer: A CartItem is associated with one Customer, and a Customer can have only one CartItem (one-to-one relationship).

    • Order "1" -- "1" Customer: An Order is associated with one Customer, and a Customer can have only one Order (one-to-one relationship).

    • Order "1" -- "N" CartItem: An Order can have multiple CartItems (one-to-many relationship), while a CartItem is associated with only one Order.

    • Order "1" -- "N" Payment: An Order can have multiple Payments (one-to-many relationship), while a Payment is associated with only one Order.

    • Wishlist "1" -- "N" Product: A Wishlist can have multiple Products (one-to-many relationship), while a Product is associated with only one Wishlist.

    • Wishlist "N" -- "1" Customer: A Wishlist belongs to one Customer, while a Customer can have multiple Wishlists (many-to-one relationship).

These relationships help to define how various entities in the application are connected and how they interact with each other.

chaldal.api's People

Contributors

mohammadeunus avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.