first commit

This commit is contained in:
2024-07-15 17:55:45 -04:00
commit 853529b871
23 changed files with 454 additions and 0 deletions

46
app/schema/delivery.py Normal file
View 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

21
app/schema/money.py Normal file
View File

@@ -0,0 +1,21 @@
from pydantic import BaseModel, Field
from datetime import datetime, timezone
def datetime_now() -> datetime:
return datetime.now(timezone.utc)
class SchemaMoney(BaseModel):
delivery_id: int
time_added: datetime
gallons_delivered: float
supplier_price: float
customer_price: float
total_amount_oil: float
total_amount_prime: float
total_amount_same_day: float
total_amount_fee: float
total_amount: float
taxes_paid: float
total_profit: float