29 lines
1.8 KiB
Python
29 lines
1.8 KiB
Python
"""简历-教育经历表(bg_user_resume_education)"""
|
||
|
||
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 UserResumeEducation(Base):
|
||
"""简历-教育经历表 bg_user_resume_education"""
|
||
__tablename__ = "bg_user_resume_education"
|
||
|
||
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")
|
||
school: Mapped[Optional[str]] = mapped_column(String(128), nullable=True, comment="学校名称")
|
||
major: Mapped[Optional[str]] = mapped_column(String(128), nullable=True, comment="专业")
|
||
degree: Mapped[Optional[str]] = mapped_column(String(32), nullable=True, comment="学历:大专/本科/硕士/博士")
|
||
study_type: Mapped[Optional[str]] = mapped_column(String(32), nullable=True, comment="学习形式:全日制/非全日制")
|
||
start_date: Mapped[Optional[str]] = mapped_column(String(16), nullable=True, comment="开始时间,格式:2023.09")
|
||
end_date: Mapped[Optional[str]] = mapped_column(String(16), nullable=True, comment="结束时间,格式:2024.06")
|
||
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="更新时间")
|