Update Session08 Backend.md

fixed some parts of fixes
This commit is contained in:
Amin
2025-06-26 01:46:39 +03:30
committed by GitHub
parent 8e7ad789fb
commit ee4df116d1
@@ -1,12 +1,24 @@
# Session 8
Profile + some fixes to database
## Fixes
- [ ] Check for missing `.ValueGeneratedOnAdd()` in all entity configurations in ```Infrastructure/Configurations```.
# Fixes
- [ ] Check for missing `.ValueGeneratedOnAdd()` in all entity configuration.
- [ ] Adjust the database setup according to the second version of ERD - [ ] Adjust the database setup according to the second version of ERD
- [ ] new erd: https://github.com/TheOrderOfPhoenix/ASP.NET/blob/main/02_ProjectOrientedSessions/docs/AlibabaERD-Version02.pdf - Some aggregates are added/modified to generate the new database
- [ ] Pay attention to the changes in logic and implementation of Person table (Id number is not unique anymore) - New ERD: https://github.com/TheOrderOfPhoenix/ASP.NET/blob/main/ProjectOrientedSessions/docs/AlibabaERD-Version02.pdf
- Note: Pay attention to the changes in logic and implementation of Person table (Id number is not unique anymore). So remove this code in PersonConfiguration:
```
builder.HasIndex(p => p.IdNumber)
.IsUnique();
```
- [ ] Add actual data in `TicketStatus`, `Gender`, `TransactionTypes` - [ ] Add actual data in `TicketStatus`, `Gender`, `TransactionTypes`
- [ ] Add data in `Seat`, `Person`, `TicketOrder`, `Transaction`, `Ticket` for test. It is recommended to write python code for generating data for Seat table, according to the data already stored in Transportation and related Vehicle data - You can either add the data in DbContext or the database itself
- [ ] Add data in `Seat`, `Person`, `TicketOrder`, `Transaction`, `Ticket` for test. It is recommended to write python code for generating data for Seat table, according to the data already stored in Transportation and related Vehicle data. There is also a SeatGenerator in this repository, as well.
- [ ] Fix claim extraction (`sub` → standardize JWT claim mapping). (`IUserContext` implmentation) - [ ] Fix claim extraction (`sub` → standardize JWT claim mapping). (`IUserContext` implmentation)
### ✅ Profile Page (Account Info Tab) ### ✅ Profile Page (Account Info Tab)