初始化
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
"""MySQL: bg_job 表模型"""
|
||||
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
|
||||
from sqlalchemy import BigInteger, DateTime, Integer, JSON, String, Text
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from app.core.database import MysqlBase
|
||||
|
||||
|
||||
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=其他")
|
||||
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)
|
||||
Reference in New Issue
Block a user