-
Notifications
You must be signed in to change notification settings - Fork 0
Story 1: Develop scaffolding code for managing BidList Entity #1
Copy link
Copy link
Open
Description
Implement the RESTFUL API for creating a BidList Entity to do the Spring Data Repository:
- Implement the RESTFUL API for reading a
BidListEntity from the existing Spring DataRepository - Implement the RESTFUL API for updating a
BidListEntity from the existing Spring DataRepository - Implement the RESTFUL API for deleting a
BidListEntity from the existing Spring Data Repository
Add attributes to the BidList entity class
- Integer BidListId;
- String account;
- String type;
- Double bidQuantity;
- Double askQuantity;
- Double bid;
- Double ask;
- String benchmark;
- Timestamp bidListDate;
- String commentary;
- String security;
- String status;
- String trader;
- String book;
- String creationName;
- Timestamp creationDate;
- String revisionName;
- Timestamp revisionDate;
- String dealName;
- String dealType;
- String sourceListId;
- String side;
Fix the database column and entity field names mapping
The next step is to ensure that each entity field name is mapped to the corresponding database column name, for instance:
@Column(name = "status") // Database column name
private String status; // Entity field name
with a mix of:
- PascalCase:
BidList - Plural:
Users
whereas the conventional naming convention is:
- snake_case and lowercase:
bid_list - singular:
user
Fix this both in the database tables creation SQL script and the entity class.
Configure audit fields
BidList.creationDate: when this entity was created- Should not be null, nor updated once set.
@CreatedDate @Column(name = "creation_date", nullable = false, updatable = false) private Instant creationDate;
- Update the database column accordingly in the schema file
- Use the
Instantdata type to take into account the time zone
- Should not be null, nor updated once set.
BidList.revisionDate: the date when this entity was last modified- Should not be null, but can be updated
@LastModifiedDate @Column(name = "revision_date", nullable = false) private Instant revisionDate;
- Should not be null, but can be updated
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
In review