mirror of
https://github.com/bellingcat/auto-archiver-api.git
synced 2026-06-11 21:18:35 +03:00
auth from extension
This commit is contained in:
17
src/db/models.py
Normal file
17
src/db/models.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from sqlalchemy import Boolean, Column, ForeignKey, Integer, String, JSON, TIMESTAMP, DateTime
|
||||
from sqlalchemy.orm import relationship
|
||||
from sqlalchemy.sql import func
|
||||
from .database import Base
|
||||
|
||||
|
||||
class Task(Base):
|
||||
__tablename__ = "tasks"
|
||||
|
||||
id = Column(String, primary_key=True, index=True)
|
||||
url = Column(String, index=True)
|
||||
author = Column(String, index=True)
|
||||
result = Column(JSON, default=None)
|
||||
created_at = Column(DateTime(timezone=True), server_default=func.now())
|
||||
# updated_at = Column(DateTime(timezone=True), onupdate=func.now())
|
||||
|
||||
# items = relationship("Item", back_populates="owner")
|
||||
Reference in New Issue
Block a user