Files
poap-reddit-bot/poapbot/db/models/admin.py
Bad_Investment cbfa50572e huge refactor
2021-05-16 16:39:41 -07:00

19 lines
420 B
Python

from pydantic import BaseModel
import ormar
from datetime import datetime
from typing import List, Optional
from . import BaseMeta
class Admin(ormar.Model):
class Meta(BaseMeta):
tablename = "admins"
constraints = [ormar.UniqueColumns('username')]
id: int = ormar.Integer(primary_key=True)
username: str = ormar.String(max_length=100)
class AdminCreate(BaseModel):
username: str