fssa-batch3 / fssa-batch3/sec_b_kishore.sugumar__corejava_project_2
Create new product
- Dominant language
- Java
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
### Feature: Create new product
> The create new product feature creates product in the products table of the database.
#### Pre-requisites:
* Create product table
* Create product entity
* Create product model
* product DAO (
* product service
#### Validations:
* Form Validation
* product null
* name ( null, empty, pattern )
* category ( null, empty, pattern )
* product id ( null, empty, pattern )
* seller id ( null, empty, pattern )
* description ( null, empty )
* used duration ( null, empty, pattern )
* price (100000000< price >0)
* min price (100000000< price >0)
* used period (100 < price > 0)
* Business Validation
* name does exists or not
#### Message:
* Invalid product input
* Product Id can't null or empty
* Name can't null or empty
* Description can't null or empty
* Invalid product id length
* Invalid category length
* Invalid used duration length
* Invalid name length
* Price should between the limit 1 - 100000000
* Price should between the limit 1 - 100000000
* Minimum amount price should be lesser than price
* Used period should between the limit 1 - 100
* Product already exists
* User already exists
#### Flow:
> Note: Invalid happen when the input provided does not meet the criteria.
```mermaid
graph TD; A[Value Passed to productService] --> B(Form Validation)
B--Valid--> C(Business Validation)
B--Invalid-->I(Throw Validation Exception)
C -- Valid --> D[Value Passed to productDAO]
D --> E[Store Value in Database]
C -- Invalid --> F[Throw Validation Error Response]
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.