-
Notifications
You must be signed in to change notification settings - Fork 8
Project 2: E Shop
Trayan Iliev edited this page May 12, 2019
·
22 revisions
The main goal of the project is to implement a web application allowing the Users (Customers and Administrators) to register, and buy from a web-shop different types of goods online, and share their experience about bought Products using Comments.
All Users should have following common attributes:
- id (generated automatically) - long number;
- name - string 2 to 50 characters long;
- email - should be valid email address;
- username - string 2 to 15 characters long - word characters only;
- password - string 8 to 15 characters long, at least one digit, one capital letter, and one sign different than letter or digit;
- gender - MALE / FEMALE enumeration;
- role - CUSTOMER or ADMIN enumeration;
- picture of the user (optional)- valid URL, if missing should ne substituted with an avatar according to the gender;
- metadata (optional) - string up to 512 characters long;
- status - validity status of the user account (ACTIVE, CHANGE_PASSWORD - should change password on login, SUSPENDED, or DEACTIVATED);
- created (generated automatically) - time stamp of the moment the user account was created;
- modified (generated automatically) - time stamp of the moment the user account was last modified;
- type - enumeration PERSON, CORPORATE;
- ssnVat - SSN of the physical persons or, ID (VAT) number of the corporate customers, string 9 to 16 characters long;
- address - the address of the Customer, string 10 to 250 characters long;
- orders - list of all Orders the Customer has already purchased;
- comments - list of all Comments the Customer has shared;
- productsAdded - list of all Products the Administrator has added to the shop;
The Administrators should be able to add new Products and fulfill or cancel Orders (by changing the Order status to COMPLETED or CANCELED). The Orders have the following structure:
- id (generated automatically) - long number;
- customer - the Customer that has placed the Order;
- closingDate - date of Order closing (completion or cancellation);
- positions - list of all Positions included in the Order, read further for details;
- description (optional) - string 10 - 500 characters long allowing the Customer to add further instructions about the Order fulfillment;
- created (generated automatically) - time stamp of the moment the entity was created;
- modified (generated automatically) - time stamp of the moment the entity was last modified;
- id (generated automatically) - long number;
- order - the Order this Position belongs to;
- product - the Product ordered;
- quantity - real number, the quantity of the Product purchased;
- price (optional) - real number with double precision, should be taken from Product entity, if missing;
- created (generated automatically) - time stamp of the moment the entity was created;
- modified (generated automatically) - time stamp of the moment the entity was last modified;
- id (generated automatically) - long number;
- name - the name of the 'Product, string 2 to 50 characters long;
- description - string 5 - 2500 characters long, supporting Markdown syntax;
- price - real number with double precision;
- isPromoted - boolean, true if product is currently in promotion campaign, false by default;
- promotionPercentage (optional) - real number with double precision, the percentage of promotion price discount;
- unit - enumeration of PCS (pieces), KG (kilograms), M (meters), L (liters), PCS by default;
- comments (optional) - list of Customer comments about the Product;
- created (generated automatically) - time stamp of the moment the entity was created;
- modified (generated automatically) - time stamp of the moment the entity was last modified;
Each Comment should have the following attributes:
- id (generated automatically) - long number;
- user - the User ID of the comment's author;
- publicationId - the Id of the Publication the comment is for;
- sectionId - the Id of the Section the comment is for;
- fragment (optional) - the relative #fragment URL inside the Publication/Section;
- page (optional) - the commented page in the Publication/Section in case of printed resource;
- text - string 5 - 1500 characters long, supporting Markdown syntax;
- tags - string including comma separated tags, allowing to find the entity by quick search;
- url (optional) - the URL of a web resource Comment author wants to refer, should be valid URL;
- created (generated automatically) - time stamp of the moment the entity was created;
- modified (generated automatically) - time stamp of the moment the entity was last modified;
- id (generated automatically) - long number;
- firstName - string 2 to 15 characters long;
- lastName - string 2 to 15 characters long;
- picture of the author (optional) - valid URL, presented only in Author's view, if missing should be skipped;
- description (optional) - string 5 - 1500 characters long, supporting Markdown syntax;
- publications - list of all Publications of the current Author;
- created (generated automatically) - time stamp of the moment the user account was created;
- modified (generated automatically) - time stamp of the moment the user account was last modified;