chat / app /schemas /user.py
ariansyahdedy's picture
Add Gemnini Flash
07fbc67
raw
history blame contribute delete
674 Bytes
from pydantic import BaseModel, EmailStr
from datetime import datetime
from bson import ObjectId
from typing import Optional, List
class UserBase(BaseModel):
username: str
phone_number: str
email: EmailStr
class UserCreate(UserBase):
credits: float = 0.0
remaining_credits: float = 0.0
payment_status: bool = False
class UserResponse(UserBase):
id: str
credits: float
remaining_credits: float
payment_status: bool
class Config:
orm_mode = True
class TransactionResponse(BaseModel):
id: str
user_id: str
amount: float
description: str
timestamp: datetime
class Config:
orm_mode = True