Spaces:
Running
Running
from app.core.database import Base, engine | |
from app.models.models import BetaApplication | |
from pydantic import BaseModel, Field | |
from datetime import datetime | |
# Create the tables | |
Base.metadata.create_all(engine) | |
print("Tables created successfully.") | |
class BetaApplicationSchema(BaseModel): | |
id: str | |
email: str | |
company: str | |
useCase: str = Field(..., alias="use_case") | |
status: str | |
createdAt: datetime = Field(..., alias="created_at") | |
updatedAt: datetime | None = Field(None, alias="updated_at") | |
class Config: | |
orm_mode = True | |
allow_population_by_field_name = True |