fssa-batch3 / fssa-batch3/sec_b_inbalokesh.esakkipandi__corejava_project_2

Create product

Open
#5 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

## Module: Products

- [ ] Create Product table
- [ ] Create Product Price table
- [ ] Create Product model
- [ ] Create Product Price model

### Feature 1: Create Product

Create new Product

#### Pre-requisites:

- [ ] Product DAO (create)
- [ ] Product Price DAO (create)
- [ ] Product Price Service (create)
- [ ] Product Service (create)

#### Validations:

- [ ] Form Validation
- product null
- name (null, empty, pattern)
- food_type (null, empty, pattern)
- quantity_type (null, empty, pattern)
- price <= 0 and price >= 1000
- quantity<= 0 and quantity>= 1000
- id <=0

- [ ] Business Validation
- Check Food name already exist
- Check Product Id already exist

#### Messages:

- [ ] Product cannot be null
- [ ] Name cannot be null or empty
- [ ] Food type cannot be null or empty
- [ ] Quantity type cannot be null or empty
- [ ] Price cannot be zero or below zero
- [ ] Quantity cannot be zero or below zero
- [ ] Set Price range between 1 and 1000
- [ ] Set Quantity range between 1 and 1000
- [ ] Invalid String Pattern
- [ ] Product already exist

#### Flow:
```mermaid
graph TD;
A["Product Service: Create New Product"] -->
B["Form Validation"] -- Valid--> C{Business Validation}
B -- Invalid --> G[Validation Exception]
C -- Valid --> D["Create Product (Returns Product id)"]
C -- Invalid --> F[Validation Exception]
D --> E[Product Price Service: Create Price]
E --> H[Form Validation] -- Valid --> I{Business Validation}
H -- Invalid --> J[Validation Exception]
I -- Valid --> K[Create Price]
I -- Invalid --> L[Validation Exception]
K --> M[Product Created Successfully]

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.