first commit
This commit is contained in:
		
							
								
								
									
										46
									
								
								app/schema/delivery.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								app/schema/delivery.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,46 @@ | ||||
| from pydantic import BaseModel, Field | ||||
| from datetime import datetime, timezone | ||||
|  | ||||
|  | ||||
| def datetime_now() -> datetime: | ||||
|     return datetime.now(timezone.utc) | ||||
|  | ||||
| class DeliverPricing(BaseModel): | ||||
|     prime: bool | ||||
|     same_day: bool | ||||
|     gallons_delivered: float | ||||
|  | ||||
|      | ||||
|      | ||||
| class SchemaDelivery(BaseModel): | ||||
|     customer_id: int | ||||
|     customer_name: str | ||||
|     customer_address: str | ||||
|     customer_town: str | ||||
|     customer_state: int | ||||
|     customer_zip: int | ||||
|     gallons_ordered: float | ||||
|     customer_asked_for_fill: int  | ||||
|     gallons_delivered: float | ||||
|     customer_filled: int | ||||
|     delivery_status: int | ||||
|     when_ordered: datetime = Field(default_factory=datetime_now)  | ||||
|     when_delivered: datetime = Field(default_factory=datetime_now) | ||||
|     expected_delivery_date: datetime = Field(default_factory=datetime_now) | ||||
|     automatic: int | ||||
|     oil_id: int | ||||
|     supplier_price: float | ||||
|     customer_price: float | ||||
|     customer_temperature: float  | ||||
|     dispatcher_notes: str | ||||
|     prime: int | ||||
|     same_day: int | ||||
|     payment_type: int  | ||||
|     payment_card_id: int | ||||
|     cash_recieved: float | ||||
|     driver_employee_id: int | ||||
|     driver_first_name: str | ||||
|     driver_last_name: str | ||||
|     pre_charge_amount: float | ||||
|     total_price: float | ||||
|     final_price: float | ||||
		Reference in New Issue
	
	Block a user