Files
offerpai_python_ai/app/models/user_resume_work.py
T
2026-04-02 16:01:08 +08:00

27 lines
1.5 KiB
Python
Raw 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_resume_work"""
from datetime import datetime
from typing import Optional
from sqlalchemy import BigInteger, Integer, String, DateTime, JSON
from sqlalchemy.orm import Mapped, mapped_column
from app.core.database import Base
class UserResumeWork(Base):
"""简历-工作经历表 bg_user_resume_work"""
__tablename__ = "bg_user_resume_work"
id: Mapped[int] = mapped_column(BigInteger, primary_key=True)
resume_id: Mapped[int] = mapped_column(BigInteger, nullable=False, comment="关联bg_user_resume.id")
user_id: Mapped[int] = mapped_column(BigInteger, nullable=False, comment="用户ID")
company_name: Mapped[Optional[str]] = mapped_column(String(128), nullable=True, comment="公司名称")
position: Mapped[Optional[str]] = mapped_column(String(128), nullable=True, comment="职位")
start_date: Mapped[Optional[str]] = mapped_column(String(16), nullable=True, comment="开始时间,格式:2023.06")
end_date: Mapped[Optional[str]] = mapped_column(String(16), nullable=True, comment="结束时间,格式:2023.09")
description: Mapped[Optional[list]] = mapped_column(JSON, nullable=True, comment="描述段落 [{id, text}]")
sort_order: Mapped[Optional[int]] = mapped_column(Integer, nullable=True, comment="排序序号")
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="更新时间")