fssa-batch3 / fssa-batch3/sec_b_kishore.sugumar__corejava_project_2
Create new bid
- Dominant language
- Java
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
### Feature: Create new bid
> The create new bid feature creates bid in the bid_history table of the database.
#### Pre-requisites:
* Create bid_history table
* Create bid entity
* Create bid model
* bid DAO(create bid)
* bid service (create(Bid bid) - 1 argument )
#### Validations:
* Form Validation
* bid ( null, empty )
* product id ( null, empty, pattern )
* bid_amount (100000000 > bid amount > minimum amount)
* seller id ( null, empty, pattern )
* Business Validation
* product does exists or not (name)
#### Message:
* Bid input cannot be null
* Product id can't null or empty
* Bidded amount should be with in the limit of 1 - 100000000
* Bidded amount is lesser than minimum amount
* Buyer Id cannot be same as Seller Id
* Invalid Buyer Id
* Buyer not found in user table
#### Flow:
> Note: Invalid happen when the input provided does not meet the criteria.
```mermaid
graph TD; A[Value Passed to bidService] --> B(Form Validation)
B--Valid--> C(Business Validation)
B--Invalid-->I(Throw Validation Exception)
C -- Valid --> D[Value Passed to bidDAO]
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.