补充文档,修改清洗方案

This commit is contained in:
zk
2026-06-02 18:38:36 +08:00
parent 30e6a6e2a5
commit 6967e4ba54
7 changed files with 363 additions and 80 deletions
+22 -21
View File
@@ -14,26 +14,27 @@ class Job(MysqlBase):
__tablename__ = "bg_job"
id: Mapped[int] = mapped_column(BigInteger, primary_key=True)
title: Mapped[str] = mapped_column(String(255), nullable=False)
company_id: Mapped[int] = mapped_column(BigInteger, nullable=False)
category_id: Mapped[int] = mapped_column(BigInteger, nullable=False)
employment_type: Mapped[int] = mapped_column(Integer, default=0)
description: Mapped[Optional[str]] = mapped_column(Text)
requirement: Mapped[Optional[str]] = mapped_column(Text)
bonus: Mapped[Optional[str]] = mapped_column(Text)
tags: Mapped[Optional[list]] = mapped_column(JSON)
skill_tags: Mapped[Optional[list]] = mapped_column(JSON)
salary: Mapped[Optional[str]] = mapped_column(String(64))
education: Mapped[int] = mapped_column(Integer, default=0)
min_experience: Mapped[int] = mapped_column(Integer, default=0)
required_industry_id: Mapped[Optional[int]] = mapped_column(BigInteger)
required_major_ids: Mapped[Optional[list]] = mapped_column(JSON)
major_sensitivity: Mapped[Optional[int]] = mapped_column(Integer)
source_url: Mapped[Optional[str]] = mapped_column(String(1024))
source_id: Mapped[Optional[str]] = mapped_column(String(64))
recruit_category: Mapped[Optional[int]] = mapped_column(Integer, comment="招聘分类: 0=校招, 1=实习, 2=社招, 3=其他")
id: Mapped[int] = mapped_column(BigInteger, primary_key=True, comment="主键ID(雪花)")
title: Mapped[str] = mapped_column(String(255), nullable=False, comment="岗位名称")
company_id: Mapped[int] = mapped_column(BigInteger, nullable=False, comment="关联公司ID")
category_id: Mapped[int] = mapped_column(BigInteger, nullable=False, comment="岗位类型ID")
employment_type: Mapped[int] = mapped_column(Integer, default=0, comment="0=全职 1=兼职")
description: Mapped[Optional[str]] = mapped_column(Text, comment="岗位职责")
requirement: Mapped[Optional[str]] = mapped_column(Text, comment="任职要求")
bonus: Mapped[Optional[str]] = mapped_column(Text, comment="加分项")
tags: Mapped[Optional[list]] = mapped_column(JSON, comment="岗位标签JSON数组")
skill_tags: Mapped[Optional[list]] = mapped_column(JSON, comment="技能标签JSON数组")
salary: Mapped[Optional[str]] = mapped_column(String(64), comment="薪资描述,如15-25K")
education: Mapped[int] = mapped_column(Integer, default=0, comment="学历要求 0=不限 1=大专 2=本科 3=硕士 4=博士")
min_experience: Mapped[int] = mapped_column(Integer, default=0, comment="最低工作年限,0=不要求")
required_industry_id: Mapped[Optional[int]] = mapped_column(BigInteger, comment="要求的行业经验ID")
required_major_ids: Mapped[Optional[list]] = mapped_column(JSON, comment="要求专业ID数组")
major_sensitivity: Mapped[Optional[int]] = mapped_column(Integer, comment="专业敏感度 0=不限 1=优先 2=强制")
source_url: Mapped[Optional[str]] = mapped_column(String(1024), comment="来源链接")
source_id: Mapped[Optional[str]] = mapped_column(String(64), comment="爬虫原始数据ID,用于去重")
content_hash: Mapped[Optional[str]] = mapped_column(String(64), comment="内容哈希,用于去重续命")
recruit_category: Mapped[Optional[int]] = mapped_column(Integer, comment="招聘分类: 0=校招 1=实习 2=社招 3=其他")
expire_at: Mapped[Optional[datetime]] = mapped_column(DateTime, comment="发布日期")
status: Mapped[int] = mapped_column(Integer, default=0, comment="0=上架 1=下架 2=已失效")
create_time: Mapped[datetime] = mapped_column(DateTime, nullable=False)
update_time: Mapped[datetime] = mapped_column(DateTime, nullable=False)
create_time: Mapped[datetime] = mapped_column(DateTime, nullable=False, comment="创建时间")
update_time: Mapped[datetime] = mapped_column(DateTime, nullable=False, comment="更新时间")