Added pydantic to models

This commit is contained in:
Ben Arc
2021-08-20 14:46:08 +01:00
parent c525655c15
commit 8dea1e28f0
18 changed files with 65 additions and 55 deletions
+3 -3
View File
@@ -1,8 +1,8 @@
from typing import NamedTuple
from sqlite3 import Row
from pydantic import BaseModel
class Jukebox(NamedTuple):
class Jukebox(BaseModel):
id: str
user: str
title: str
@@ -22,7 +22,7 @@ class Jukebox(NamedTuple):
return cls(**dict(row))
class JukeboxPayment(NamedTuple):
class JukeboxPayment(BaseModel):
payment_hash: str
juke_id: str
song_id: str