mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
20 lines
606 B
TypeScript
20 lines
606 B
TypeScript
|
|
import { z } from "zod";
|
||
|
|
import { EntityTable } from 'Dexie';
|
||
|
|
|
||
|
|
export const RoomTableSchema = z.object({
|
||
|
|
id: z.string(),
|
||
|
|
roomName: z.string(),
|
||
|
|
createdBy: z.object({
|
||
|
|
wxUserId: z.number(),
|
||
|
|
wxFullName: z.string(),
|
||
|
|
wxeMail: z.string().email(),
|
||
|
|
userPhoto: z.string().nullable().optional()// api check
|
||
|
|
}),
|
||
|
|
createdAt: z.any(),
|
||
|
|
expirationDate: z.any().nullable(),
|
||
|
|
})
|
||
|
|
|
||
|
|
export type RoomTable = z.infer<typeof RoomTableSchema>
|
||
|
|
export type DexieRoomsTableSchema = EntityTable<RoomTable, 'id'>;
|
||
|
|
export const RoomTableColumn = 'id, createdBy, roomName, roomType, expirationDate, lastMessage'
|