feat: enhance character status extraction and update schema for nullable status
All checks were successful
Build Docker Image / build (push) Successful in 1m22s

This commit is contained in:
2026-03-03 23:26:53 +01:00
parent 70de84f3ab
commit b5816e6c28
4 changed files with 165 additions and 27 deletions

View File

@@ -4,6 +4,8 @@ import { user } from './auth.schema';
// Define devil fruit types
export type DevilFruitType = 'Paramecia' | 'Zoan' | 'Logia' | 'Smile' | 'Unknown';
export type Status = 'Alive' | 'Dead' | 'Unknown';
// Define the site config table schema
export const config = sqliteTable('config', {
key: text('key').primaryKey(),
@@ -44,7 +46,7 @@ export const character = sqliteTable('character', {
firstAppearance: integer('firstAppearance').notNull(),
pictureUrl: text('pictureUrl'),
epithets: text('epithets', { mode: 'json' }).$type<string[]>(),
status: text('status'),
status: text('status').$type<Status | null>(),
arcId: text('arcId').references(() => arc.id),
url: text('url'),
isInDailyMode: integer('isInDailyMode', { mode: 'boolean' }).default(true)
@@ -67,7 +69,7 @@ export const characterOverride = sqliteTable('characterOverride', {
firstAppearance: integer('firstAppearance'),
pictureUrl: text('pictureUrl'),
epithets: text('epithets', { mode: 'json' }).$type<string[]>(),
status: text('status'),
status: text('status').$type<Status | null>(),
arcId: text('arcId').references(() => arc.id),
url: text('url'),
notes: text('notes')
@@ -90,7 +92,7 @@ export const characterScrapeValidation = sqliteTable('characterScrapeValidation'
firstAppearance: integer('firstAppearance').notNull(),
pictureUrl: text('pictureUrl'),
epithets: text('epithets', { mode: 'json' }).$type<string[]>(),
status: text('status'),
status: text('status').$type<Status | null>(),
arcId: text('arcId').references(() => arc.id),
url: text('url')
});