4.8 KiB
4.8 KiB
Here's a structured checklist document, broken into sections by feature area. Each section contains tasks in implementation order (oldest to newest), rephrased as clear action items with contextual notes for implementation. These are created based on this commit messages: https://github.com/MehrdadShirvani/AlibabaClone-Backend/commits/develop/
Miscellaneous / Fixes
- Fix GUID generation and async handling in ticket creation. (Use
Guid.NewGuid()instead ofnew Guid()) - Make
SerialNumber,TicketOrderId,BaseAmountpublicly settable in DTOs. - Fix issues in seat mappings and transportation queries.
Fixes and Missing Parts from Session 08
👤 Person & Account Info
- Add
Person,BankAccountDetail, and navigation properties. - Add
UpsertPersonAsyncandUpsertBankAccountDetailAsyncinIAccountService. - Add
UpsertPerson,UpsertBankDetailendpoints inAccountController. - Add
GetPeople,GetProfileAsync, and DTOs (ProfileDto,PersonDto,BankAccountDetailDto). - Handle person editing logic via
UpsertPersonand adjust classes that used it the old way.
🔐 Auth & Settings
- Complete the error handling of
EditEmailDto,EditPasswordDto. - Add
GetByEmailAsyncinAccountRepository.
Branching
- Create the feature/ticket-reservation branch based on develop
Ticket Ordering System
🧱 Domain and Infrastructure Setup
- Check out new ERD: Here
- Create
TicketOrder,Ticket, andTransactionentities. - Add configurations for
TicketOrder,Ticket, andTransaction(relationships, constraints). - Adjust
Transportationentity configuration to support ticketing. - Add migrations for the above database changes.
🧑💼 Service Layer
- Create
ITicketOrderService,TicketOrderServiceand implement:CreateTicketOrderAsyncGenerateTicketsPdfAsync
- Register
TicketOrderServicein DI container.
🎯 Controller Layer
- Create
TicketOrderControllerwith the following endpoints:POST /CreateTicketOrderGET /DownloadPdf
🔁 DTOs & Mappings
- Add
CreateTicketOrderDto,CreateTravelerTicketDto. - Add
TicketOrderSummaryDto,TravelerTicketDto. - Add mappings in
MappingProfile.
🗃️ Repository Layer
- Create
ITicketOrderRepository,TicketOrderRepository. - Implement:
FindAndLoadAllDetailsGetAllByBuyerId
Transportation and Seat Selection
- Add
TransportationSeatDto. - Add method
GetSeatsByVehicleIdinISeatRepositoryand implement it. - Add mapping from
SeattoTransportationSeatDto. - Add
GetTransportationSeatsAsyncinITransportationServiceand implement. - Add
GetTransportationSeatsendpoint inTransportationController. - Fix vehicle and seat-related mapping issues (e.g., missing
VehicleTypeId, logic errors). - Ensure
RemainingCapacityis treated as calculated (ignored in EF, removed from schema).
Coupon System
🏗️ Domain & Infrastructure
- Add
Couponentity withIsExpired,CouponCode(unique). - Add
ICouponRepository,CouponRepository. - Add
DiscountDto,CouponValidationRequestDto. - Add migrations for new
Coupontable.
🧑💼 Service & Logic
- Create
ICouponService, implement validation logic. - Add coupon validation in
TicketOrderService.
🎯 Controller
- Add
ValidateCouponendpoint inCouponController.
Payment & Transactions
- Add
CouponIdtoPayForTicketOrderAsyncinIAccountService& implementation. - Add
CouponIdtoTransactionDto(adjusted toCouponCodelater). - Add
TopUpAccountlogic (DTO, Controller, Service). - Add
Transactionrelationship toTicketOrderas one-to-one. - Add logic for creating transactions with tickets.
- Add endpoint
GetMyTransactionsand DTOs (TransactionDto).
✅ Ticket Review & Confirmation
- Add
TicketOrderSummaryDto, map details: from/to city, company, vehicle, time. - Implement
GetTravelOrderDetailsendpoint to fetch ticket summary. - Display number of travelers, per-seat price, and total cost.
- Include coupon entry and balance payment option.
- Use ticket + person data (via
GetTicketOrderTravelersDetails).
✅ PDF Generation
- Install
QuestPDFin infrastructure. - Create
IPdfGenerator, implement with QuestPDF. - Register
IPdfGeneratorservice. - Create
PdfGeneratorlogic to render ticket PDFs. - Add PDF download endpoint (
DownloadPdf) inTicketOrderController.
Merge
- Create a PR and merge the current branch with develop