Skip to content

fix(server): 数据库时间字段改用 BigInt 以修复毫秒时间戳溢出 - #1

Open
283375 wants to merge 1 commit into
qnxg:mainfrom
283375:fix/time-bigint-dev-lh-0823
Open

fix(server): 数据库时间字段改用 BigInt 以修复毫秒时间戳溢出#1
283375 wants to merge 1 commit into
qnxg:mainfrom
283375:fix/time-bigint-dev-lh-0823

Conversation

@283375

@283375 283375 commented Aug 22, 2026

Copy link
Copy Markdown
Member

背景

Prisma Int 映射 PostgreSQL INT4, 上限 2^31-1, 装不下毫秒级 Unix 时间戳, 导致投递/岗位写入溢出报错.

改动

  • schema 7 个时间字段 (createdAt / updatedAt / deadline) IntBigInt, 新增 migration 扩列
  • mapper / auth.me 用 Number() 把 bigint 转回 DTO 的 number 毫秒契约 (bigint 无法过 trpc 默认 JSON 序列化)

验证

  • pnpm check / pnpm lint 通过
  • 写入 / 读取 / 失效检测实测通过
  • 前端时间显示正常

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant