- Updated the announcement detail component to directly use images and videos from the data structure. - Changed the form edit component to accommodate the new media structure, replacing AnnunciWithImages with AnnunciWithMedia. - Modified the announcements list to initialize videos as an empty array. - Enhanced the announcement view to handle external videos and updated the footer to display them correctly. - Introduced a new utility function to generate YouTube embed URLs. - Updated the database schema to replace url_video with external_videos and added a new videos_refs table for video management. - Implemented video processing logic, including downloading, transcoding, and thumbnail generation. - Added migration scripts for the new videos_refs table and updated existing references in the database.
119 lines
4.2 KiB
TypeScript
119 lines
4.2 KiB
TypeScript
// @generated
|
|
// This file is automatically generated by Kanel. Do not modify manually.
|
|
|
|
import type { Caratteristiche } from '../../utils/kanel-types.ts';
|
|
import type { ColumnType, Selectable, Insertable, Updateable } from 'kysely';
|
|
|
|
/** Identifier type for public.annunci */
|
|
export type AnnunciId = number & { __brand: 'public.annunci' };
|
|
|
|
/** Represents the table public.annunci */
|
|
export default interface AnnunciTable {
|
|
id: ColumnType<AnnunciId, AnnunciId | undefined, AnnunciId>;
|
|
|
|
codice: ColumnType<string, string, string>;
|
|
|
|
locatore: ColumnType<string | null, string | null, string | null>;
|
|
|
|
numero: ColumnType<string | null, string | null, string | null>;
|
|
|
|
idlocatore: ColumnType<string | null, string | null, string | null>;
|
|
|
|
indirizzo: ColumnType<string | null, string | null, string | null>;
|
|
|
|
civico: ColumnType<string | null, string | null, string | null>;
|
|
|
|
comune: ColumnType<string | null, string | null, string | null>;
|
|
|
|
cap: ColumnType<string | null, string | null, string | null>;
|
|
|
|
provincia: ColumnType<string | null, string | null, string | null>;
|
|
|
|
regione: ColumnType<string | null, string | null, string | null>;
|
|
|
|
lat: ColumnType<string | null, string | null, string | null>;
|
|
|
|
lon: ColumnType<string | null, string | null, string | null>;
|
|
|
|
indirizzo_secondario: ColumnType<string | null, string | null, string | null>;
|
|
|
|
civico_secondario: ColumnType<string | null, string | null, string | null>;
|
|
|
|
lat_secondario: ColumnType<string | null, string | null, string | null>;
|
|
|
|
lon_secondario: ColumnType<string | null, string | null, string | null>;
|
|
|
|
tipo: ColumnType<string | null, string | null, string | null>;
|
|
|
|
categorie: ColumnType<string[] | null, string[] | null, string[] | null>;
|
|
|
|
prezzo: ColumnType<number, number | undefined, number>;
|
|
|
|
anno: ColumnType<string | null, string | null, string | null>;
|
|
|
|
classe: ColumnType<string | null, string | null, string | null>;
|
|
|
|
mq: ColumnType<string | null, string | null, string | null>;
|
|
|
|
piano: ColumnType<string | null, string | null, string | null>;
|
|
|
|
piano_palazzo: ColumnType<number | null, number | null, number | null>;
|
|
|
|
unita_condominio: ColumnType<number | null, number | null, number | null>;
|
|
|
|
numero_vani: ColumnType<number | null, number | null, number | null>;
|
|
|
|
numero_camere: ColumnType<number | null, number | null, number | null>;
|
|
|
|
numero_bagni: ColumnType<number | null, number | null, number | null>;
|
|
|
|
numero_balconi: ColumnType<number | null, number | null, number | null>;
|
|
|
|
numero_terrazzi: ColumnType<number | null, number | null, number | null>;
|
|
|
|
numero_box: ColumnType<number | null, number | null, number | null>;
|
|
|
|
numero_postiauto: ColumnType<number | null, number | null, number | null>;
|
|
|
|
accessori: ColumnType<string[] | null, string[] | null, string[] | null>;
|
|
|
|
titolo_it: ColumnType<string | null, string | null, string | null>;
|
|
|
|
desc_it: ColumnType<string | null, string | null, string | null>;
|
|
|
|
titolo_en: ColumnType<string | null, string | null, string | null>;
|
|
|
|
desc_en: ColumnType<string | null, string | null, string | null>;
|
|
|
|
stato: ColumnType<string | null, string | null, string | null>;
|
|
|
|
web: ColumnType<boolean | null, boolean | null, boolean | null>;
|
|
|
|
caratteristiche: ColumnType<Caratteristiche | null, Caratteristiche | null, Caratteristiche | null>;
|
|
|
|
homepage: ColumnType<boolean | null, boolean | null, boolean | null>;
|
|
|
|
external_videos: ColumnType<string[] | null, string[] | null, string[] | null>;
|
|
|
|
email: ColumnType<string | null, string | null, string | null>;
|
|
|
|
creato_il: ColumnType<Date | null, Date | string | null, Date | string | null>;
|
|
|
|
modificato_il: ColumnType<Date | null, Date | string | null, Date | string | null>;
|
|
|
|
consegna: ColumnType<number | null, number | null, number | null>;
|
|
|
|
disponibile_da: ColumnType<Date | null, Date | string | null, Date | string | null>;
|
|
|
|
permanenza: ColumnType<number[] | null, number[] | null, number[] | null>;
|
|
|
|
persone: ColumnType<string[] | null, string[] | null, string[] | null>;
|
|
|
|
media_updated_at: ColumnType<Date | null, Date | string | null, Date | string | null>;
|
|
}
|
|
|
|
export type Annunci = Selectable<AnnunciTable>;
|
|
|
|
export type NewAnnunci = Insertable<AnnunciTable>;
|
|
|
|
export type AnnunciUpdate = Updateable<AnnunciTable>;
|