mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
ITOTEAM-523 notification status
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { Dexie, EntityTable, liveQuery } from 'Dexie';
|
||||
import { z } from 'zod';
|
||||
|
||||
export const NotificationTableSchema = z.object({
|
||||
notificationId: z.string().nullable(),
|
||||
title: z.string().optional().nullable(),
|
||||
service: z.string().nullable(),
|
||||
object: z.string().optional().nullable(),
|
||||
idObject: z.string().nullable(),
|
||||
folderId: z.string().optional().nullable(),
|
||||
dateInit: z.string().optional().nullable(),
|
||||
dateEnd: z.string().optional().nullable(),
|
||||
location: z.string().optional().nullable(),
|
||||
status: z.boolean().optional(),
|
||||
})
|
||||
export type NotificationTable = z.infer<typeof NotificationTableSchema>
|
||||
|
||||
// Database declaration (move this to its own module also)
|
||||
export const NotificationDataSource = new Dexie('NotificationDataSource') as Dexie & {
|
||||
notification: EntityTable<NotificationTable, 'notificationId'>;
|
||||
};
|
||||
|
||||
NotificationDataSource.version(1).stores({
|
||||
notification: 'notificationId, title, service, object, idObject, folderId, dateInit, dateEnd, location, createdAt'
|
||||
});
|
||||
Reference in New Issue
Block a user