1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-30 15:04:18 +00:00
This commit is contained in:
Steffo 2018-06-08 20:54:58 +02:00
parent f3627552d3
commit 084a000842

4
db.py
View file

@ -1,7 +1,7 @@
import datetime import datetime
from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker, relationship from sqlalchemy.orm import sessionmaker, relationship
from sqlalchemy import Column, BigInteger, Integer, String, DateTime, ForeignKey, Float, Enum, create_engine, UniqueConstraint, PrimaryKeyConstraint, Boolean, or_, LargeBinary, Text from sqlalchemy import Column, BigInteger, Integer, String, DateTime, ForeignKey, Float, Enum, create_engine, UniqueConstraint, PrimaryKeyConstraint, Boolean, or_, LargeBinary, Text, Date
import requests import requests
from errors import RequestError, NotFoundError, AlreadyExistingError from errors import RequestError, NotFoundError, AlreadyExistingError
import re import re
@ -28,7 +28,7 @@ class Royal(Base):
password = Column(LargeBinary) password = Column(LargeBinary)
role = Column(String) role = Column(String)
fiorygi = Column(Integer, default=0) fiorygi = Column(Integer, default=0)
member_since = Column(DateTime) member_since = Column(Date)
@staticmethod @staticmethod
def create(session: Session, username: str): def create(session: Session, username: str):