Clusterpuck / RoutingData

API access to the Routing Data creation with Entity Framework
0 stars 0 forks source link

Data Validation #8

Closed Clusterpuck closed 5 days ago

Clusterpuck commented 1 month ago

Disallow duplicate fields, such as customer, location and products Don't allow invalid data such as Phone number with letters.

Clusterpuck commented 1 week ago

Deleting Product -> Remove from incomplete orders only, only change status Nick Deleting Accounts -> Set a status only, don’t delete “removed” Nick Deleting Customers -> Set a status only, don’t delete “removed” Nick Deleting Delivery Routes -> Can only delete active routes -all orders must go back to planned Nick Deleting Orders -> Can only delete undelivered Amelie - DONE Deleting Locations -> Status change to something, can’t be assigned to unfinished order Amelie - DONE Deleting Vehicles -> Status change to out of commission Amelie - DONE Deleting OrderProducts -> Only ever done as part of deleting Order or Product, under those limitations. Amelie - Not relevent, OrderProductController deleted

Clusterpuck commented 1 week ago

Accounts: No existing username (handled already by database) Nick Vehicles: No matching license plate. Amelie - DONE Customer: Handled by database Nick DeliveryRoutes: Nick Driver exists: done, (assigned route on same date? Not yet please) All orders are “planned” and exist deliveryDate > Now vehicleID is not “out of commission status” Driver Account is still working there.

Location: no controls Amelie - DONE OrderProducts: Remove entirely from API, not needed outside database Amelie - DONE Orders: Check if product isn’t “discontinued” status. Customer isn’t “inactive” status. Set account by token on request. Location isn’t inactive status. deliveryDate >today. Amelie Products: Managed by database Nick

ameliefishr commented 6 days ago

add LocationIn DTO VehicleIn DTO

ameliefishr commented 6 days ago

make deleting vehicle check if it's assocaited to routes before deleting

ameliefishr commented 6 days ago

Accounts Controller:

Delivery Controller:

Location Controller:

Vehicle Controller:

Clusterpuck commented 6 days ago

Post order should not require status, id or OrderID, postion number or delivery ID, or product status. Should give feedback on bad addition

Clusterpuck commented 6 days ago

Deleting order does not delete orderproduct