/
Lz42
/
FastAPI
Обзор
Документация
Войти
/
Lz42
/
FastAPI
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
P1/models/user.py
18 строк
637 B
stanislaumich
AUTO FROM work 29.10.2024 15:09:53,09
29 окт 2024, 15:09
29 окт 2024, 15:09
5cce2a7
Код
Авторство
О чём код?
from sqlalchemy import Column, Integer, String, DateTime, Boolean from database import Base class User(Base): __tablename__ = 'users' id = Column(Integer, primary_key=True, index = True, autoincrement=True) username = Column(String, unique=True, nullable=False) password = Column(String, nullable=False) name = Column(String, unique=True, index=True, nullable=False) dolg = Column(String) dop = Column(String) phone = Column(String) email = Column(String) is_admin = Column(Boolean, default=False) is_active = Column(Boolean, default=True) is_superuser = Column(Boolean, default=False)