初始化
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
"""MySQL: 关联表模型"""
|
||||
|
||||
from datetime import datetime
|
||||
|
||||
from sqlalchemy import BigInteger, DateTime, String
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from app.core.database import MysqlBase
|
||||
|
||||
|
||||
class JobRegionRelation(MysqlBase):
|
||||
"""岗位-地区关联表"""
|
||||
|
||||
__tablename__ = "bg_job_region_relation"
|
||||
|
||||
id: Mapped[int] = mapped_column(BigInteger, primary_key=True, autoincrement=True)
|
||||
job_id: Mapped[int] = mapped_column(BigInteger, nullable=False)
|
||||
region_code: Mapped[str] = mapped_column(String(20), nullable=False)
|
||||
create_time: Mapped[datetime] = mapped_column(DateTime, nullable=False)
|
||||
|
||||
|
||||
class JobSkillTagRelation(MysqlBase):
|
||||
"""岗位-技能标签关联表"""
|
||||
|
||||
__tablename__ = "bg_job_skill_tag_relation"
|
||||
|
||||
id: Mapped[int] = mapped_column(BigInteger, primary_key=True, autoincrement=True)
|
||||
job_id: Mapped[int] = mapped_column(BigInteger, nullable=False)
|
||||
skill_tag_id: Mapped[int] = mapped_column(BigInteger, nullable=False)
|
||||
create_time: Mapped[datetime] = mapped_column(DateTime, nullable=False)
|
||||
Reference in New Issue
Block a user