2021-09-28 21:18:15 +02:00
|
|
|
from typing import Optional
|
2022-07-16 14:23:03 +02:00
|
|
|
|
2021-09-28 21:18:15 +02:00
|
|
|
from fastapi.param_functions import Query
|
2021-08-20 14:46:08 +01:00
|
|
|
from pydantic import BaseModel
|
2021-08-20 12:44:03 +01:00
|
|
|
|
2021-10-17 18:33:29 +01:00
|
|
|
|
2021-09-28 21:18:15 +02:00
|
|
|
class CreateFormData(BaseModel):
|
|
|
|
name: str = Query(...)
|
|
|
|
webhook: str = Query(None)
|
|
|
|
description: str = Query(..., min_length=0)
|
|
|
|
amount: int = Query(..., ge=0)
|
|
|
|
flatrate: int = Query(...)
|
|
|
|
|
2021-10-17 18:33:29 +01:00
|
|
|
|
2021-09-28 21:18:15 +02:00
|
|
|
class CreateTicketData(BaseModel):
|
|
|
|
form: str = Query(...)
|
|
|
|
name: str = Query(...)
|
|
|
|
email: str = Query("")
|
|
|
|
ltext: str = Query(...)
|
|
|
|
sats: int = Query(..., ge=0)
|
|
|
|
|
2021-10-17 18:33:29 +01:00
|
|
|
|
2021-08-20 14:46:08 +01:00
|
|
|
class Forms(BaseModel):
|
2021-08-20 12:44:03 +01:00
|
|
|
id: str
|
|
|
|
wallet: str
|
|
|
|
name: str
|
2021-09-28 21:18:15 +02:00
|
|
|
webhook: Optional[str]
|
2021-08-20 12:44:03 +01:00
|
|
|
description: str
|
|
|
|
amount: int
|
|
|
|
flatrate: int
|
|
|
|
amountmade: int
|
|
|
|
time: int
|
|
|
|
|
|
|
|
|
2021-08-20 14:46:08 +01:00
|
|
|
class Tickets(BaseModel):
|
2021-08-20 12:44:03 +01:00
|
|
|
id: str
|
|
|
|
form: str
|
|
|
|
email: str
|
|
|
|
ltext: str
|
|
|
|
name: str
|
|
|
|
wallet: str
|
|
|
|
sats: int
|
|
|
|
paid: bool
|
|
|
|
time: int
|