Add new deps, writen a db engine, docker-compose and .env-example
This commit is contained in:
15
backend/app/models/posts.py
Normal file
15
backend/app/models/posts.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from sqlalchemy import Column, Integer, String, ForeignKey, DateTime
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
from app.db_engine import Base
|
||||
|
||||
|
||||
class Post(Base):
|
||||
__tablename__ = "posts"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True, autoincrement=True, nullable=False)
|
||||
title = Column(String, index=True, nullable=False)
|
||||
content = Column(String, index=True, nullable=False)
|
||||
images = Column(String, index=True)
|
||||
updated_at = Column(DateTime, index=True)
|
||||
|
||||
Reference in New Issue
Block a user