-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodels.py
39 lines (30 loc) · 863 Bytes
/
models.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from datetime import datetime, timedelta, timezone
from typing import Optional
from fastapi import Query
from pydantic import BaseModel
class CreateSatspot(BaseModel):
name: str
haircut: int = 0
closing_date: datetime = datetime.now(timezone.utc) + timedelta(days=1)
buy_in: int = 0
class Satspot(BaseModel):
id: Optional[str] = None
wallet: str
user: Optional[str] = None
name: str
closing_date: datetime
buy_in: int = 0
haircut: int = 0
players: str = ""
completed: bool = False
created_at: datetime = datetime.now(timezone.utc)
class Getgame(BaseModel):
id: Optional[str] = None
name: str
closing_date: datetime
buy_in: int = 0
haircut: int = 0
completed: bool = False
class JoinSatspotGame(BaseModel):
satspot_id: str = Query(None)
ln_address: str = Query(None)