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

19 lines
429 B
Python

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