class CandidateBase(Base):
    """
    Nexton recruit candidate
    """

    name: str = Field(..., description="Candidate name")
    email: str = Field(..., description="Candidate email")
    linkedin_url: str = Field(..., description="LinkedIn URL")
    avatar_path: Optional[str] = Field(...,
                                       description="Candidate avatar path")
Beispiel #2
0
class TransactionItemBase(RelationBase):
    """
    TransactionItem
    """

    transaction_id: UUID = Field(..., description="Transaction Id")
    product_id: UUID = Field(..., description="Product Id")

    quantity: int = Field(..., description="Quantity of items")
    amount: float = Field(..., description="Amount")
Beispiel #3
0
class TransactionCreate(BaseModel):
    type: TransactionTypesBase = Field(
        ...,
        description=
        "Transaction type. Possible values are: PAYMENT, CASH-OUT, TRANSFER",
    )
    description: str = Field(..., description="Transaction description")
    amount: float = Field(..., description="Total transaction amount")

    user_id: UUID = Field(
        ..., description="Connected user_id that has executed the transaction")

    items: List[TransactionItemCreate] = Field(
        ..., description="List of transaction items")
Beispiel #4
0
class TransactionItemCreate(BaseModel):
    product_id: UUID = Field(..., description="Product Id")

    quantity: int = Field(..., description="Quantity of items")
    amount: float = Field(..., description="Amount")
class CandidateUpdate(CandidateCreate):
    avatar_path: Optional[str] = Field(...,
                                       description="Candidate avatar path")
class CandidateCreate(BaseModel):
    name: str = Field(..., description="Candidate name")
    email: str = Field(..., description="Candidate email")
    linkedin_url: str = Field(..., description="LinkedIn URL")
Beispiel #7
0
class ProductBase(Base):
    """
    Product
    """

    description: str = Field(..., description="Product description")
Beispiel #8
0
class ProductCreate(BaseModel):
    description: str = Field(..., description="Product description")