mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-08-07 09:01:29 -04:00
Make history's time
non nullable (it was never null anyways)
This commit is contained in:
parent
4fb1406f2b
commit
bc8e87f343
@ -18,7 +18,7 @@ export const history = schema.table(
|
||||
.references(() => entries.pk, { onDelete: "cascade" }),
|
||||
videoPk: integer().references(() => videos.pk, { onDelete: "set null" }),
|
||||
percent: integer().notNull().default(0),
|
||||
time: integer(),
|
||||
time: integer().notNull().default(0),
|
||||
playedDate: timestamp({ withTimezone: true, mode: "iso" })
|
||||
.notNull()
|
||||
.default(sql`now()`),
|
||||
|
@ -3,15 +3,13 @@ import { comment } from "~/utils";
|
||||
|
||||
export const Progress = t.Object({
|
||||
percent: t.Integer({ minimum: 0, maximum: 100 }),
|
||||
time: t.Nullable(
|
||||
t.Integer({
|
||||
time: t.Integer({
|
||||
minimum: 0,
|
||||
description: comment`
|
||||
When this episode was stopped (in seconds since the start).
|
||||
This value is null if the entry was never watched or is finished.
|
||||
`,
|
||||
}),
|
||||
),
|
||||
playedDate: t.Nullable(t.String({ format: "date-time" })),
|
||||
videoId: t.Nullable(
|
||||
t.String({
|
||||
|
@ -29,7 +29,7 @@ const Base = z.object({
|
||||
),
|
||||
progress: z.object({
|
||||
percent: z.int().min(0).max(100),
|
||||
time: z.int().min(0).nullable(),
|
||||
time: z.int().min(0),
|
||||
playedDate: zdate().nullable(),
|
||||
videoId: z.string().nullable(),
|
||||
}),
|
||||
|
@ -22,7 +22,7 @@ export const Extra = z.object({
|
||||
|
||||
progress: z.object({
|
||||
percent: z.int().min(0).max(100),
|
||||
time: z.int().min(0).nullable(),
|
||||
time: z.int().min(0),
|
||||
playedDate: zdate().nullable(),
|
||||
}),
|
||||
});
|
||||
|
@ -39,7 +39,7 @@ export const FullVideo = Video.extend({
|
||||
slugs: z.array(z.string()),
|
||||
progress: z.object({
|
||||
percent: z.int().min(0).max(100),
|
||||
time: z.int().min(0).nullable(),
|
||||
time: z.int().min(0),
|
||||
playedDate: zdate().nullable(),
|
||||
videoId: z.string().nullable(),
|
||||
}),
|
||||
|
Loading…
x
Reference in New Issue
Block a user