tipos de domain sin hardcode (falta revisar PlanDatosSep)
This commit is contained in:
@@ -1,9 +0,0 @@
|
|||||||
export type Json =
|
|
||||||
| string
|
|
||||||
| number
|
|
||||||
| boolean
|
|
||||||
| null
|
|
||||||
| { [key: string]: Json }
|
|
||||||
| Json[];
|
|
||||||
|
|
||||||
export type Database = any; // ✅ Reemplaza por tipos generados (supabase gen types typescript)
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import type { Enums, Tables } from "../../types/supabase";
|
import type { Enums, Tables } from "../../types/supabase";
|
||||||
import type { Json } from "src/types/supabase";
|
|
||||||
|
|
||||||
export type UUID = string;
|
export type UUID = string;
|
||||||
|
|
||||||
@@ -11,18 +10,13 @@ export type TipoOrigen = Enums<"tipo_origen">;
|
|||||||
|
|
||||||
export type TipoAsignatura = Enums<"tipo_asignatura">;
|
export type TipoAsignatura = Enums<"tipo_asignatura">;
|
||||||
|
|
||||||
export type TipoBibliografia = "BASICA" | "COMPLEMENTARIA";
|
export type TipoBibliografia = Enums<"tipo_bibliografia">;
|
||||||
export type TipoFuenteBibliografia = "MANUAL" | "BIBLIOTECA";
|
export type TipoFuenteBibliografia = Enums<"tipo_fuente_bibliografia">;
|
||||||
|
|
||||||
export type EstadoTareaRevision = "PENDIENTE" | "COMPLETADA" | "OMITIDA";
|
export type EstadoTareaRevision = Enums<"estado_tarea_revision">;
|
||||||
export type TipoNotificacion =
|
export type TipoNotificacion = Enums<"tipo_notificacion">;
|
||||||
| "PLAN_ASIGNADO"
|
|
||||||
| "ESTADO_CAMBIADO"
|
|
||||||
| "TAREA_ASIGNADA"
|
|
||||||
| "COMENTARIO"
|
|
||||||
| "OTRA";
|
|
||||||
|
|
||||||
export type TipoInteraccionIA = "GENERAR" | "MEJORAR_SECCION" | "CHAT" | "OTRA";
|
export type TipoInteraccionIA = Enums<"tipo_interaccion_ia">;
|
||||||
|
|
||||||
export type ModalidadEducativa = "Escolar" | "No escolarizada" | "Mixta";
|
export type ModalidadEducativa = "Escolar" | "No escolarizada" | "Mixta";
|
||||||
export type DisenoCurricular = "Rígido" | "Flexible";
|
export type DisenoCurricular = "Rígido" | "Flexible";
|
||||||
@@ -64,12 +58,7 @@ export type CarreraRow = Tables<"carreras">;
|
|||||||
|
|
||||||
export type EstructuraPlanRow = Tables<"estructuras_plan">;
|
export type EstructuraPlanRow = Tables<"estructuras_plan">;
|
||||||
|
|
||||||
export type EstructuraAsignatura = {
|
export type EstructuraAsignatura = Tables<"estructuras_asignatura">;
|
||||||
id: UUID;
|
|
||||||
nombre: string;
|
|
||||||
version: string | null;
|
|
||||||
definicion: Json;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type EstadoPlanRow = Tables<"estados_plan">;
|
export type EstadoPlanRow = Tables<"estados_plan">;
|
||||||
export type PlanEstudioRow = Tables<"planes_estudio">;
|
export type PlanEstudioRow = Tables<"planes_estudio">;
|
||||||
@@ -80,141 +69,20 @@ export type PlanEstudio = PlanEstudioRow & {
|
|||||||
estados_plan: EstadoPlanRow | null;
|
estados_plan: EstadoPlanRow | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type LineaPlan = {
|
export type LineaPlan = Tables<"lineas_plan">;
|
||||||
id: UUID;
|
|
||||||
plan_estudio_id: UUID;
|
|
||||||
nombre: string;
|
|
||||||
orden: number;
|
|
||||||
area: string | null;
|
|
||||||
creado_en: string;
|
|
||||||
actualizado_en: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type Asignatura = {
|
export type Asignatura = Tables<"asignaturas">;
|
||||||
id: UUID;
|
|
||||||
plan_estudio_id: UUID;
|
|
||||||
estructura_id: UUID | null;
|
|
||||||
|
|
||||||
facultad_propietaria_id: UUID | null;
|
export type BibliografiaAsignatura = Tables<"bibliografia_asignatura">;
|
||||||
|
|
||||||
codigo: string | null;
|
export type CambioPlan = Tables<"cambios_plan">;
|
||||||
nombre: string;
|
|
||||||
|
|
||||||
tipo: TipoAsignatura;
|
export type CambioAsignatura = Tables<"cambios_asignatura">;
|
||||||
creditos: number;
|
|
||||||
horas_semana: number | null;
|
|
||||||
|
|
||||||
numero_ciclo: number | null;
|
export type InteraccionIA = Tables<"interacciones_ia">;
|
||||||
linea_plan_id: UUID | null;
|
|
||||||
orden_celda: number | null;
|
|
||||||
|
|
||||||
datos: Json;
|
export type TareaRevision = Tables<"tareas_revision">;
|
||||||
contenido_tematico: Json;
|
|
||||||
|
|
||||||
tipo_origen: TipoOrigen | null;
|
export type Notificacion = Tables<"notificaciones">;
|
||||||
meta_origen: Json;
|
|
||||||
|
|
||||||
creado_por: UUID | null;
|
export type Archivo = Tables<"archivos">;
|
||||||
actualizado_por: UUID | null;
|
|
||||||
|
|
||||||
creado_en: string;
|
|
||||||
actualizado_en: string;
|
|
||||||
|
|
||||||
planes_estudio?: PlanEstudio | null;
|
|
||||||
estructuras_asignatura?: EstructuraAsignatura | null;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type BibliografiaAsignatura = {
|
|
||||||
id: UUID;
|
|
||||||
asignatura_id: UUID;
|
|
||||||
tipo: TipoBibliografia;
|
|
||||||
cita: string;
|
|
||||||
tipo_fuente: TipoFuenteBibliografia;
|
|
||||||
biblioteca_item_id: string | null;
|
|
||||||
|
|
||||||
creado_por: UUID | null;
|
|
||||||
creado_en: string;
|
|
||||||
actualizado_en: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type CambioPlan = {
|
|
||||||
id: UUID;
|
|
||||||
plan_estudio_id: UUID;
|
|
||||||
cambiado_por: UUID | null;
|
|
||||||
cambiado_en: string;
|
|
||||||
tipo: "ACTUALIZACION_CAMPO" | "ACTUALIZACION_MAPA" | "OTRO";
|
|
||||||
campo: string | null;
|
|
||||||
valor_anterior: Json | null;
|
|
||||||
valor_nuevo: Json | null;
|
|
||||||
interaccion_ia_id: UUID | null;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type CambioAsignatura = {
|
|
||||||
id: UUID;
|
|
||||||
asignatura_id: UUID;
|
|
||||||
cambiado_por: UUID | null;
|
|
||||||
cambiado_en: string;
|
|
||||||
tipo: "ACTUALIZACION_CAMPO" | "ACTUALIZACION_MAPA" | "OTRO";
|
|
||||||
campo: string | null;
|
|
||||||
valor_anterior: Json | null;
|
|
||||||
valor_nuevo: Json | null;
|
|
||||||
fuente: "HUMANO" | "IA" | null;
|
|
||||||
interaccion_ia_id: UUID | null;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type InteraccionIA = {
|
|
||||||
id: UUID;
|
|
||||||
usuario_id: UUID | null;
|
|
||||||
plan_estudio_id: UUID | null;
|
|
||||||
asignatura_id: UUID | null;
|
|
||||||
|
|
||||||
tipo: TipoInteraccionIA;
|
|
||||||
modelo: string | null;
|
|
||||||
temperatura: number | null;
|
|
||||||
|
|
||||||
prompt: Json;
|
|
||||||
respuesta: Json;
|
|
||||||
|
|
||||||
aceptada: boolean;
|
|
||||||
|
|
||||||
conversacion_id: string | null;
|
|
||||||
ids_archivos: Json;
|
|
||||||
ids_vector_store: Json;
|
|
||||||
|
|
||||||
creado_en: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type TareaRevision = {
|
|
||||||
id: UUID;
|
|
||||||
plan_estudio_id: UUID;
|
|
||||||
asignado_a: UUID;
|
|
||||||
rol_id: UUID | null;
|
|
||||||
estado_id: UUID | null;
|
|
||||||
estatus: EstadoTareaRevision;
|
|
||||||
fecha_limite: string | null;
|
|
||||||
creado_en: string;
|
|
||||||
completado_en: string | null;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type Notificacion = {
|
|
||||||
id: UUID;
|
|
||||||
usuario_id: UUID;
|
|
||||||
tipo: TipoNotificacion;
|
|
||||||
payload: Json;
|
|
||||||
leida: boolean;
|
|
||||||
creado_en: string;
|
|
||||||
leida_en: string | null;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type Archivo = {
|
|
||||||
id: UUID;
|
|
||||||
ruta_storage: string;
|
|
||||||
nombre: string;
|
|
||||||
mime_type: string | null;
|
|
||||||
bytes: number | null;
|
|
||||||
subido_por: UUID | null;
|
|
||||||
subido_en: string;
|
|
||||||
temporal: boolean;
|
|
||||||
openai_file_id: string | null;
|
|
||||||
notas: string | null;
|
|
||||||
};
|
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user