Files
offerpai_python_ai/app/models/user_job_customize_resume.py
2026-04-28 11:16:50 +08:00

25 lines
1.1 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""用户岗位定制简历表(bg_user_job_customize_resume
一个用户 + 一个岗位 = 一份定制简历,content 字段存完整 CustomizeResume JSON。
"""
from datetime import datetime
from typing import Optional
from sqlalchemy import BigInteger, DateTime, JSON
from sqlalchemy.orm import Mapped, mapped_column
from app.core.database import Base
class UserJobCustomizeResume(Base):
"""用户岗位定制简历表 bg_user_job_customize_resume"""
__tablename__ = "bg_user_job_customize_resume"
id: Mapped[int] = mapped_column(BigInteger, primary_key=True)
user_id: Mapped[int] = mapped_column(BigInteger, nullable=False, comment="用户ID")
job_id: Mapped[int] = mapped_column(BigInteger, nullable=False, comment="岗位ID,关联 bg_job.id")
content: Mapped[Optional[dict]] = mapped_column(JSON, nullable=False, comment="定制简历完整 JSONCustomizeResume 结构)")
create_time: Mapped[datetime] = mapped_column(DateTime, default=datetime.now, comment="创建时间")
update_time: Mapped[datetime] = mapped_column(DateTime, default=datetime.now, onupdate=datetime.now, comment="更新时间")