infoalloggi-monorepo/apps/infoalloggi/src/schemas/public/ChatsEtichette.ts

32 lines
1 KiB
TypeScript
Raw Normal View History

import { chatsChatid, type ChatsChatid } from './Chats';
import { etichetteIdEtichetta, type EtichetteIdEtichetta } from './Etichette';
import type { ColumnType, Selectable, Insertable, Updateable } from 'kysely';
import { z } from 'zod';
2025-08-04 17:45:44 +02:00
/** Represents the table public.chats_etichette */
export default interface ChatsEtichetteTable {
chatid: ColumnType<ChatsChatid, ChatsChatid, ChatsChatid>;
2025-08-04 17:45:44 +02:00
etichettaid: ColumnType<EtichetteIdEtichetta, EtichetteIdEtichetta, EtichetteIdEtichetta>;
2025-08-04 17:45:44 +02:00
}
export type ChatsEtichette = Selectable<ChatsEtichetteTable>;
export type NewChatsEtichette = Insertable<ChatsEtichetteTable>;
export type ChatsEtichetteUpdate = Updateable<ChatsEtichetteTable>;
export const ChatsEtichetteSchema = z.object({
chatid: chatsChatid,
etichettaid: etichetteIdEtichetta,
});
export const NewChatsEtichetteSchema = z.object({
chatid: chatsChatid,
etichettaid: etichetteIdEtichetta,
});
export const ChatsEtichetteUpdateSchema = z.object({
chatid: chatsChatid.optional(),
etichettaid: etichetteIdEtichetta.optional(),
});