generated _collections class
This commit is contained in:
parent
842c127817
commit
938f950646
6 changed files with 132 additions and 13 deletions
18
_collections/models.py
Normal file
18
_collections/models.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
from fastapi import HTTPException
|
||||
from sqlalchemy import Column, Integer, String, Float, Boolean, ForeignKey
|
||||
from sqlalchemy.dialects.postgresql import ARRAY
|
||||
from sqlalchemy.orm import Session
|
||||
from ..config import Base
|
||||
|
||||
|
||||
|
||||
|
||||
##### veri tabanı modelleri #####
|
||||
class Collections(Base):
|
||||
__tablename__ = "collections_table"
|
||||
|
||||
collection_id = Column(Integer, index=True, primary_key=True , autoincrement=True)
|
||||
user_id = Column(Integer, ForeignKey('users_table.user_id'), nullable=False)
|
||||
visibility = Column(Boolean, default=True)
|
||||
colllection_name = Column(String, default="No name")
|
||||
collection_description = Column(String, default="No description")
|
||||
Loading…
Add table
Add a link
Reference in a new issue