19 lines
599 B
Python
19 lines
599 B
Python
|
|
# -*- coding: utf-8 -*-
|
||
|
|
# @Time : 2024/11/13 下午3:38
|
||
|
|
# @Author : 河瞬
|
||
|
|
# @FileName: raw_data.py
|
||
|
|
# @Software: PyCharm
|
||
|
|
from tortoise.models import Model
|
||
|
|
from tortoise import fields
|
||
|
|
|
||
|
|
|
||
|
|
class RawData(Model):
|
||
|
|
id = fields.IntField(primary_key=True)
|
||
|
|
url = fields.TextField()
|
||
|
|
title = fields.TextField()
|
||
|
|
content = fields.TextField(null=True)
|
||
|
|
source = fields.ForeignKeyField("models.Source", related_name="raw_data")
|
||
|
|
detected_at = fields.DatetimeField(auto_now_add=True)
|
||
|
|
fetched_at = fields.DatetimeField(auto_now=True)
|
||
|
|
is_processed = fields.BooleanField(default=False)
|