Перенесено из репозитария SpecialistOff.NET

This commit is contained in:
2018-02-26 09:59:54 +03:00
parent b7d2da4899
commit 5a727393c9
358 changed files with 46103 additions and 0 deletions

25
myapp/models/users.py Normal file
View File

@@ -0,0 +1,25 @@
#!/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()