26 lines
656 B
Python
26 lines
656 B
Python
#!/usr/bin/env python3
|
|
# -*- coding: UTF-8 -*-
|
|
|
|
__author__ = 'RemiZOffAlex'
|
|
__copyright__ = '(c) RemiZOffAlex'
|
|
__license__ = 'MIT'
|
|
__email__ = 'remizoffalex@mail.ru'
|
|
|
|
import datetime
|
|
from sqlalchemy import Table, Column, Boolean, Integer, ForeignKey, String, DateTime
|
|
from sqlalchemy.orm import relationship
|
|
|
|
from . import Base
|
|
|
|
class User(Base):
|
|
__tablename__ = "user"
|
|
|
|
id = Column(Integer, primary_key=True)
|
|
name = Column(String, nullable=False, unique=True)
|
|
password = Column(String, nullable=False)
|
|
created = Column(DateTime)
|
|
|
|
def __init__(self, name):
|
|
self.name = name
|
|
self.created = datetime.datetime.utcnow()
|