-
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, unique within the system, cannot be changed;
- username - string 2 to 15 characters long - word characters only, unique within the system, cannot be changed;
- password - string 8 to 15 characters long, at least one digit, one capital letter, and one sign different than letter or digit, NOT sent back to the User clients for security reasons;
- gender - MALE / FEMALE enumeration;
- role - CUSTOMER or ADMIN enumeration, CUSTOMER by default, editable only by Administrators;
- picture of the user (optional)- valid URL, if missing should ne substituted with an avatar according to the gender;
- status - validity status of the user account (ACTIVE, CHANGE_PASSWORD - should change password on login, SUSPENDED, or DEACTIVATED), accessible and editable only by Administrators;
- metadata (optional) - string up to 512 characters long, accessible and editable only by Administrators;
- 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;
- tags - string including comma separated tags, allowing to find the Products by quick search;
- 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;
- author - the comment's author (User);
- product - the Product the comment is about;
- text - string 5 - 1500 characters long, supporting Markdown syntax;
- url (optional) - the URL of a web resource Comment author wants to refer, should be valid URL;
- approvementStatus - enumeration of SUGGESTED, APPROVED, DISAPPROVED;
- 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;