添加字段

This commit is contained in:
zk
2026-07-28 10:50:09 +08:00
parent 6e70258208
commit f841fdd89e
2 changed files with 5 additions and 1 deletions
+3 -1
View File
@@ -3,7 +3,7 @@
from datetime import datetime from datetime import datetime
from typing import Optional from typing import Optional
from sqlalchemy import BigInteger, DateTime, String, Text from sqlalchemy import BigInteger, DateTime, Integer, String, Text
from sqlalchemy.orm import Mapped, mapped_column from sqlalchemy.orm import Mapped, mapped_column
from app.core.database import MysqlBase from app.core.database import MysqlBase
@@ -32,5 +32,7 @@ class RecruitAnnouncement(MysqlBase):
apply_email: Mapped[Optional[str]] = mapped_column(String(128), comment="投递邮箱") apply_email: Mapped[Optional[str]] = mapped_column(String(128), comment="投递邮箱")
source: Mapped[Optional[str]] = mapped_column(String(255), comment="信息来源说明") source: Mapped[Optional[str]] = mapped_column(String(255), comment="信息来源说明")
publish_time: Mapped[Optional[datetime]] = mapped_column(DateTime, comment="公告发布/更新时间") publish_time: Mapped[Optional[datetime]] = mapped_column(DateTime, comment="公告发布/更新时间")
clean_status: Mapped[int] = mapped_column(Integer, nullable=False, default=0, comment="清洗状态:0-清洗中 1-清洗完成")
status: Mapped[int] = mapped_column(Integer, nullable=False, default=1, comment="状态:0-失效 1-有效")
create_time: Mapped[datetime] = mapped_column(DateTime, nullable=False, comment="创建时间") create_time: Mapped[datetime] = mapped_column(DateTime, nullable=False, comment="创建时间")
update_time: Mapped[datetime] = mapped_column(DateTime, nullable=False, comment="更新时间") update_time: Mapped[datetime] = mapped_column(DateTime, nullable=False, comment="更新时间")
+2
View File
@@ -28,6 +28,8 @@ CREATE TABLE `bg_recruit_announcement` (
`apply_email` VARCHAR(128) NULL COMMENT '投递邮箱', `apply_email` VARCHAR(128) NULL COMMENT '投递邮箱',
`source` VARCHAR(255) NULL COMMENT '信息来源说明', `source` VARCHAR(255) NULL COMMENT '信息来源说明',
`publish_time` DATETIME NULL COMMENT '公告发布/更新时间', `publish_time` DATETIME NULL COMMENT '公告发布/更新时间',
`clean_status` INT NOT NULL DEFAULT 0 COMMENT '清洗状态:0-清洗中 1-清洗完成',
`status` INT NOT NULL DEFAULT 1 COMMENT '状态:0-失效 1-有效',
`create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', `update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),