18 lines
504 B
Python
18 lines
504 B
Python
from sqlalchemy.ext.declarative import declarative_base
|
|
from sqlalchemy import Column, Integer, String, DateTime
|
|
from sqlalchemy.dialects.postgresql import UUID
|
|
import uuid
|
|
|
|
Base = declarative_base()
|
|
|
|
class Website(Base):
|
|
|
|
__tablename__ = 'websites'
|
|
id = Column(UUID(as_uuid=True), primary_key=True, default = uuid.uuid4)
|
|
url = Column(String)
|
|
text_content = Column(String)
|
|
html_content = Column(String)
|
|
first_crawl_date = Column(DateTime)
|
|
last_crawl_date = Column(DateTime)
|
|
|
|
|