true message
This commit is contained in:
@@ -1,25 +0,0 @@
|
|||||||
{
|
|
||||||
"query": "SELECT id, email, openId FROM users LIMIT 10",
|
|
||||||
"command": "mysql --batch --raw --column-names --default-character-set=utf8mb4 --host gateway02.us-east-1.prod.aws.tidbcloud.com --port 4000 --user 4CrrYuB5tme73Qo.root --database 7PAT67UmWoxv8vwp8Bbcv6 --execute SELECT id, email, openId FROM users LIMIT 10",
|
|
||||||
"rows": [
|
|
||||||
{
|
|
||||||
"id": "1110110",
|
|
||||||
"email": "opareige@gmail.com",
|
|
||||||
"openId": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "2010001",
|
|
||||||
"email": "o.pareige@itinova.org",
|
|
||||||
"openId": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "2040001",
|
|
||||||
"email": "test@itinova.org",
|
|
||||||
"openId": ""
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"messages": [],
|
|
||||||
"stdout": "id\temail\topenId\n1110110\topareige@gmail.com\t\n2010001\to.pareige@itinova.org\t\n2040001\ttest@itinova.org\t\n",
|
|
||||||
"stderr": "",
|
|
||||||
"execution_time_ms": 95
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"query": "ALTER TABLE users ADD COLUMN IF NOT EXISTS openId VARCHAR(64) NULL",
|
|
||||||
"command": "mysql --batch --raw --column-names --default-character-set=utf8mb4 --host gateway02.us-east-1.prod.aws.tidbcloud.com --port 4000 --user 4CrrYuB5tme73Qo.root --database 7PAT67UmWoxv8vwp8Bbcv6 --execute ALTER TABLE users ADD COLUMN IF NOT EXISTS openId VARCHAR(64) NULL",
|
|
||||||
"rows": [],
|
|
||||||
"messages": [],
|
|
||||||
"stdout": "",
|
|
||||||
"stderr": "",
|
|
||||||
"execution_time_ms": 51
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"query": "ALTER TABLE users ADD COLUMN IF NOT EXISTS loginMethod VARCHAR(64) NULL",
|
|
||||||
"command": "mysql --batch --raw --column-names --default-character-set=utf8mb4 --host gateway02.us-east-1.prod.aws.tidbcloud.com --port 4000 --user 4CrrYuB5tme73Qo.root --database 7PAT67UmWoxv8vwp8Bbcv6 --execute ALTER TABLE users ADD COLUMN IF NOT EXISTS loginMethod VARCHAR(64) NULL",
|
|
||||||
"rows": [],
|
|
||||||
"messages": [],
|
|
||||||
"stdout": "",
|
|
||||||
"stderr": "",
|
|
||||||
"execution_time_ms": 45
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"query": "ALTER TABLE users MODIFY COLUMN password VARCHAR(255) NULL",
|
|
||||||
"command": "mysql --batch --raw --column-names --default-character-set=utf8mb4 --host gateway02.us-east-1.prod.aws.tidbcloud.com --port 4000 --user 4CrrYuB5tme73Qo.root --database 7PAT67UmWoxv8vwp8Bbcv6 --execute ALTER TABLE users MODIFY COLUMN password VARCHAR(255) NULL",
|
|
||||||
"rows": [],
|
|
||||||
"messages": [],
|
|
||||||
"stdout": "",
|
|
||||||
"stderr": "",
|
|
||||||
"execution_time_ms": 198
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"query": "ALTER TABLE sequences MODIFY COLUMN publicCible ENUM('directeur', 'chef_service', 'tous', 'autre') NOT NULL",
|
|
||||||
"command": "mysql --batch --raw --column-names --default-character-set=utf8mb4 --host gateway02.us-east-1.prod.aws.tidbcloud.com --port 4000 --user 4CrrYuB5tme73Qo.root --database 7PAT67UmWoxv8vwp8Bbcv6 --execute ALTER TABLE sequences MODIFY COLUMN publicCible ENUM('directeur', 'chef_service', 'tous', 'autre') NOT NULL",
|
|
||||||
"rows": [],
|
|
||||||
"messages": [],
|
|
||||||
"stdout": "",
|
|
||||||
"stderr": "",
|
|
||||||
"execution_time_ms": 594
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"query": "ALTER TABLE sequences ADD COLUMN formateur VARCHAR(255) NULL AFTER publicCible;",
|
|
||||||
"command": "mysql --batch --raw --column-names --default-character-set=utf8mb4 --host gateway02.us-east-1.prod.aws.tidbcloud.com --port 4000 --user 4CrrYuB5tme73Qo.root --database 7PAT67UmWoxv8vwp8Bbcv6 --execute ALTER TABLE sequences ADD COLUMN formateur VARCHAR(255) NULL AFTER publicCible;",
|
|
||||||
"rows": [],
|
|
||||||
"messages": [],
|
|
||||||
"stdout": "",
|
|
||||||
"stderr": "",
|
|
||||||
"execution_time_ms": 495
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"query": "CREATE TABLE IF NOT EXISTS formateurs (\n id INT AUTO_INCREMENT PRIMARY KEY,\n nom VARCHAR(255) NOT NULL UNIQUE,\n actif BOOLEAN DEFAULT TRUE NOT NULL,\n createdAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,\n updatedAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL\n);",
|
|
||||||
"command": "mysql --batch --raw --column-names --default-character-set=utf8mb4 --host gateway02.us-east-1.prod.aws.tidbcloud.com --port 4000 --user 4CrrYuB5tme73Qo.root --database 7PAT67UmWoxv8vwp8Bbcv6 --execute CREATE TABLE IF NOT EXISTS formateurs (\n id INT AUTO_INCREMENT PRIMARY KEY,\n nom VARCHAR(255) NOT NULL UNIQUE,\n actif BOOLEAN DEFAULT TRUE NOT NULL,\n createdAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,\n updatedAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL\n);",
|
|
||||||
"rows": [],
|
|
||||||
"messages": [],
|
|
||||||
"stdout": "",
|
|
||||||
"stderr": "",
|
|
||||||
"execution_time_ms": 189
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"query": "CREATE TABLE IF NOT EXISTS rappels (\n id INT AUTO_INCREMENT PRIMARY KEY,\n nom VARCHAR(255) NOT NULL,\n joursAvant INT NOT NULL,\n emailTemplate TEXT NOT NULL,\n actif BOOLEAN DEFAULT TRUE NOT NULL,\n createdAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,\n updatedAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL\n);\n\nCREATE TABLE IF NOT EXISTS rappelsEnvoyes (\n id INT AUTO_INCREMENT PRIMARY KEY,\n rappelId INT NOT NULL,\n inscriptionId INT NOT NULL,\n dateEnvoi TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,\n INDEX idx_rappel_inscription (rappelId, inscriptionId)\n);",
|
|
||||||
"command": "mysql --batch --raw --column-names --default-character-set=utf8mb4 --host gateway02.us-east-1.prod.aws.tidbcloud.com --port 4000 --user 4CrrYuB5tme73Qo.root --database 7PAT67UmWoxv8vwp8Bbcv6 --execute CREATE TABLE IF NOT EXISTS rappels (\n id INT AUTO_INCREMENT PRIMARY KEY,\n nom VARCHAR(255) NOT NULL,\n joursAvant INT NOT NULL,\n emailTemplate TEXT NOT NULL,\n actif BOOLEAN DEFAULT TRUE NOT NULL,\n createdAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,\n updatedAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL\n);\n\nCREATE TABLE IF NOT EXISTS rappelsEnvoyes (\n id INT AUTO_INCREMENT PRIMARY KEY,\n rappelId INT NOT NULL,\n inscriptionId INT NOT NULL,\n dateEnvoi TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,\n INDEX idx_rappel_inscription (rappelId, inscriptionId)\n);",
|
|
||||||
"rows": [],
|
|
||||||
"messages": [],
|
|
||||||
"stdout": "",
|
|
||||||
"stderr": "",
|
|
||||||
"execution_time_ms": 354
|
|
||||||
}
|
|
||||||
@@ -9,13 +9,11 @@ import AdminRapportPublicCible from "./pages/AdminRapportPublicCible";
|
|||||||
import Admin from "./pages/Admin";
|
import Admin from "./pages/Admin";
|
||||||
import AdminFormations from "./pages/AdminFormations";
|
import AdminFormations from "./pages/AdminFormations";
|
||||||
import AdminSequences from "./pages/AdminSequences";
|
import AdminSequences from "./pages/AdminSequences";
|
||||||
import AdminCalendrier from "./pages/AdminCalendrier";
|
|
||||||
import AdminApprenants from "./pages/AdminApprenants";
|
import AdminApprenants from "./pages/AdminApprenants";
|
||||||
import AdminSequenceInscrits from "./pages/AdminSequenceInscrits";
|
import AdminSequenceInscrits from "./pages/AdminSequenceInscrits";
|
||||||
import AdminUsers from "./pages/AdminUsers";
|
import AdminUsers from "./pages/AdminUsers";
|
||||||
import AdminEmailTemplates from "./pages/AdminEmailTemplates";
|
import AdminEmailTemplates from "./pages/AdminEmailTemplates";
|
||||||
import AdminEmailConfig from "./pages/AdminEmailConfig";
|
import AdminEmailConfig from "./pages/AdminEmailConfig";
|
||||||
import AdminRappels from "./pages/AdminRappels";
|
|
||||||
import Inscription from "./pages/Inscription";
|
import Inscription from "./pages/Inscription";
|
||||||
|
|
||||||
function Router() {
|
function Router() {
|
||||||
@@ -27,13 +25,11 @@ function Router() {
|
|||||||
<Route path={"/admin"} component={Admin} />
|
<Route path={"/admin"} component={Admin} />
|
||||||
<Route path={"/admin/formations"} component={AdminFormations} />
|
<Route path={"/admin/formations"} component={AdminFormations} />
|
||||||
<Route path={"/admin/sequences"} component={AdminSequences} />
|
<Route path={"/admin/sequences"} component={AdminSequences} />
|
||||||
<Route path={"/admin/calendrier"} component={AdminCalendrier} />
|
|
||||||
<Route path={"/admin/apprenants"} component={AdminApprenants} />
|
<Route path={"/admin/apprenants"} component={AdminApprenants} />
|
||||||
<Route path={"/admin/sequences/:id/inscrits"} component={AdminSequenceInscrits} />
|
<Route path={"/admin/sequences/:id/inscrits"} component={AdminSequenceInscrits} />
|
||||||
<Route path={"/admin/users"} component={AdminUsers} />
|
<Route path={"/admin/users"} component={AdminUsers} />
|
||||||
<Route path={"/admin/email-templates"} component={AdminEmailTemplates} />
|
<Route path={"/admin/email-templates"} component={AdminEmailTemplates} />
|
||||||
<Route path={"/admin/email-config"} component={AdminEmailConfig} />
|
<Route path={"/admin/email-config"} component={AdminEmailConfig} />
|
||||||
<Route path={"/admin/rappels"} component={AdminRappels} />
|
|
||||||
<Route path={"/404"} component={NotFound} />
|
<Route path={"/404"} component={NotFound} />
|
||||||
{/* Final fallback route */}
|
{/* Final fallback route */}
|
||||||
<Route component={NotFound} />
|
<Route component={NotFound} />
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
import { Progress } from "@/components/ui/progress";
|
|
||||||
import { cn } from "@/lib/utils";
|
|
||||||
|
|
||||||
interface CapacityProgressBarProps {
|
|
||||||
current: number;
|
|
||||||
max: number;
|
|
||||||
className?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function CapacityProgressBar({ current, max, className }: CapacityProgressBarProps) {
|
|
||||||
const percentage = max > 0 ? (current / max) * 100 : 0;
|
|
||||||
|
|
||||||
// Définir la couleur en fonction du taux de remplissage
|
|
||||||
const getColorClass = () => {
|
|
||||||
if (percentage >= 90) return "bg-red-500";
|
|
||||||
if (percentage >= 70) return "bg-orange-500";
|
|
||||||
return "bg-green-500";
|
|
||||||
};
|
|
||||||
|
|
||||||
const getTextColorClass = () => {
|
|
||||||
if (percentage >= 90) return "text-red-700";
|
|
||||||
if (percentage >= 70) return "text-orange-700";
|
|
||||||
return "text-green-700";
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className={cn("space-y-1", className)}>
|
|
||||||
<div className="flex items-center justify-between text-sm gap-4">
|
|
||||||
<span className={cn("font-medium", getTextColorClass())}>
|
|
||||||
{current} / {max}
|
|
||||||
</span>
|
|
||||||
<span className={cn("text-xs", getTextColorClass())}>
|
|
||||||
{Math.round(percentage)}%
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<Progress
|
|
||||||
value={percentage}
|
|
||||||
className="h-2"
|
|
||||||
indicatorClassName={getColorClass()}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -21,7 +21,7 @@ import {
|
|||||||
} from "@/components/ui/sidebar";
|
} from "@/components/ui/sidebar";
|
||||||
import { APP_LOGO, APP_TITLE, getLoginUrl } from "@/const";
|
import { APP_LOGO, APP_TITLE, getLoginUrl } from "@/const";
|
||||||
import { useIsMobile } from "@/hooks/useMobile";
|
import { useIsMobile } from "@/hooks/useMobile";
|
||||||
import { LayoutDashboard, LogOut, PanelLeft, Users, GraduationCap, Calendar, CalendarDays, BarChart3, UserCog, Mail, Settings, Bell } from "lucide-react";
|
import { LayoutDashboard, LogOut, PanelLeft, Users, GraduationCap, Calendar, BarChart3, UserCog, Mail, Settings } from "lucide-react";
|
||||||
import { CSSProperties, useEffect, useRef, useState } from "react";
|
import { CSSProperties, useEffect, useRef, useState } from "react";
|
||||||
import { useLocation } from "wouter";
|
import { useLocation } from "wouter";
|
||||||
import { DashboardLayoutSkeleton } from './DashboardLayoutSkeleton';
|
import { DashboardLayoutSkeleton } from './DashboardLayoutSkeleton';
|
||||||
@@ -31,12 +31,10 @@ const menuItems = [
|
|||||||
{ icon: LayoutDashboard, label: "Tableau de bord", path: "/admin" },
|
{ icon: LayoutDashboard, label: "Tableau de bord", path: "/admin" },
|
||||||
{ icon: GraduationCap, label: "Formations", path: "/admin/formations" },
|
{ icon: GraduationCap, label: "Formations", path: "/admin/formations" },
|
||||||
{ icon: Calendar, label: "Séquences", path: "/admin/sequences" },
|
{ icon: Calendar, label: "Séquences", path: "/admin/sequences" },
|
||||||
{ icon: CalendarDays, label: "Calendrier", path: "/admin/calendrier" },
|
|
||||||
{ icon: Users, label: "Apprenants", path: "/admin/apprenants" },
|
{ icon: Users, label: "Apprenants", path: "/admin/apprenants" },
|
||||||
{ icon: UserCog, label: "Utilisateurs", path: "/admin/users" },
|
{ icon: UserCog, label: "Utilisateurs", path: "/admin/users" },
|
||||||
{ icon: Mail, label: "Templates d'emails", path: "/admin/email-templates" },
|
{ icon: Mail, label: "Templates d'emails", path: "/admin/email-templates" },
|
||||||
{ icon: Settings, label: "Configuration SMTP", path: "/admin/email-config" },
|
{ icon: Settings, label: "Configuration SMTP", path: "/admin/email-config" },
|
||||||
{ icon: Bell, label: "Rappels automatiques", path: "/admin/rappels" },
|
|
||||||
{ icon: BarChart3, label: "Rapport Public Cible", path: "/admin/rapport-public-cible" },
|
{ icon: BarChart3, label: "Rapport Public Cible", path: "/admin/rapport-public-cible" },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -1,135 +0,0 @@
|
|||||||
import { useState } from "react";
|
|
||||||
import { Check, ChevronsUpDown, Plus } from "lucide-react";
|
|
||||||
import { cn } from "@/lib/utils";
|
|
||||||
import { Button } from "@/components/ui/button";
|
|
||||||
import {
|
|
||||||
Command,
|
|
||||||
CommandEmpty,
|
|
||||||
CommandGroup,
|
|
||||||
CommandInput,
|
|
||||||
CommandItem,
|
|
||||||
CommandList,
|
|
||||||
} from "@/components/ui/command";
|
|
||||||
import {
|
|
||||||
Popover,
|
|
||||||
PopoverContent,
|
|
||||||
PopoverTrigger,
|
|
||||||
} from "@/components/ui/popover";
|
|
||||||
import { trpc } from "@/lib/trpc";
|
|
||||||
import { toast } from "sonner";
|
|
||||||
|
|
||||||
interface FormateurComboboxProps {
|
|
||||||
value: string;
|
|
||||||
onChange: (value: string) => void;
|
|
||||||
placeholder?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function FormateurCombobox({ value, onChange, placeholder = "Sélectionner un formateur..." }: FormateurComboboxProps) {
|
|
||||||
const [open, setOpen] = useState(false);
|
|
||||||
const [searchValue, setSearchValue] = useState("");
|
|
||||||
|
|
||||||
const { data: formateurs = [], refetch } = trpc.formateurs.list.useQuery();
|
|
||||||
const createMutation = trpc.formateurs.create.useMutation({
|
|
||||||
onSuccess: () => {
|
|
||||||
toast.success("Formateur ajouté");
|
|
||||||
refetch();
|
|
||||||
},
|
|
||||||
onError: (error) => {
|
|
||||||
toast.error(error.message || "Erreur lors de l'ajout du formateur");
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const handleAddNew = () => {
|
|
||||||
if (!searchValue.trim()) {
|
|
||||||
toast.error("Veuillez entrer un nom de formateur");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Vérifier si le formateur existe déjà
|
|
||||||
const exists = formateurs.some(f => f.nom.toLowerCase() === searchValue.toLowerCase());
|
|
||||||
if (exists) {
|
|
||||||
toast.error("Ce formateur existe déjà");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
createMutation.mutate({ nom: searchValue.trim() });
|
|
||||||
onChange(searchValue.trim());
|
|
||||||
setSearchValue("");
|
|
||||||
setOpen(false);
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Popover open={open} onOpenChange={setOpen}>
|
|
||||||
<PopoverTrigger asChild>
|
|
||||||
<Button
|
|
||||||
variant="outline"
|
|
||||||
role="combobox"
|
|
||||||
aria-expanded={open}
|
|
||||||
className="w-full justify-between"
|
|
||||||
>
|
|
||||||
{value || placeholder}
|
|
||||||
<ChevronsUpDown className="ml-2 h-4 w-4 shrink-0 opacity-50" />
|
|
||||||
</Button>
|
|
||||||
</PopoverTrigger>
|
|
||||||
<PopoverContent className="w-full p-0">
|
|
||||||
<Command>
|
|
||||||
<CommandInput
|
|
||||||
placeholder="Rechercher ou ajouter un formateur..."
|
|
||||||
value={searchValue}
|
|
||||||
onValueChange={setSearchValue}
|
|
||||||
/>
|
|
||||||
<CommandList>
|
|
||||||
<CommandEmpty>
|
|
||||||
<div className="flex flex-col items-center gap-2 py-2">
|
|
||||||
<p className="text-sm text-muted-foreground">Aucun formateur trouvé</p>
|
|
||||||
{searchValue && (
|
|
||||||
<Button
|
|
||||||
size="sm"
|
|
||||||
variant="outline"
|
|
||||||
onClick={handleAddNew}
|
|
||||||
disabled={createMutation.isPending}
|
|
||||||
>
|
|
||||||
<Plus className="mr-2 h-4 w-4" />
|
|
||||||
Ajouter "{searchValue}"
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</CommandEmpty>
|
|
||||||
<CommandGroup>
|
|
||||||
{formateurs.map((formateur) => (
|
|
||||||
<CommandItem
|
|
||||||
key={formateur.id}
|
|
||||||
value={formateur.nom}
|
|
||||||
onSelect={(currentValue) => {
|
|
||||||
onChange(currentValue === value ? "" : currentValue);
|
|
||||||
setOpen(false);
|
|
||||||
setSearchValue("");
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Check
|
|
||||||
className={cn(
|
|
||||||
"mr-2 h-4 w-4",
|
|
||||||
value === formateur.nom ? "opacity-100" : "opacity-0"
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
{formateur.nom}
|
|
||||||
</CommandItem>
|
|
||||||
))}
|
|
||||||
</CommandGroup>
|
|
||||||
{searchValue && !formateurs.some(f => f.nom.toLowerCase() === searchValue.toLowerCase()) && (
|
|
||||||
<CommandGroup>
|
|
||||||
<CommandItem
|
|
||||||
onSelect={handleAddNew}
|
|
||||||
className="text-primary"
|
|
||||||
>
|
|
||||||
<Plus className="mr-2 h-4 w-4" />
|
|
||||||
Ajouter "{searchValue}"
|
|
||||||
</CommandItem>
|
|
||||||
</CommandGroup>
|
|
||||||
)}
|
|
||||||
</CommandList>
|
|
||||||
</Command>
|
|
||||||
</PopoverContent>
|
|
||||||
</Popover>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -3,16 +3,11 @@ import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|||||||
|
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
interface ProgressProps extends React.ComponentProps<typeof ProgressPrimitive.Root> {
|
|
||||||
indicatorClassName?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
function Progress({
|
function Progress({
|
||||||
className,
|
className,
|
||||||
value,
|
value,
|
||||||
indicatorClassName,
|
|
||||||
...props
|
...props
|
||||||
}: ProgressProps) {
|
}: React.ComponentProps<typeof ProgressPrimitive.Root>) {
|
||||||
return (
|
return (
|
||||||
<ProgressPrimitive.Root
|
<ProgressPrimitive.Root
|
||||||
data-slot="progress"
|
data-slot="progress"
|
||||||
@@ -24,7 +19,7 @@ function Progress({
|
|||||||
>
|
>
|
||||||
<ProgressPrimitive.Indicator
|
<ProgressPrimitive.Indicator
|
||||||
data-slot="progress-indicator"
|
data-slot="progress-indicator"
|
||||||
className={cn("bg-primary h-full w-full flex-1 transition-all", indicatorClassName)}
|
className="bg-primary h-full w-full flex-1 transition-all"
|
||||||
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
|
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
|
||||||
/>
|
/>
|
||||||
</ProgressPrimitive.Root>
|
</ProgressPrimitive.Root>
|
||||||
|
|||||||
@@ -1,226 +0,0 @@
|
|||||||
import { useState } from "react";
|
|
||||||
import DashboardLayout from "@/components/DashboardLayout";
|
|
||||||
import { Button } from "@/components/ui/button";
|
|
||||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
|
||||||
import { trpc } from "@/lib/trpc";
|
|
||||||
import { ChevronLeft, ChevronRight, Calendar as CalendarIcon } from "lucide-react";
|
|
||||||
import { format, startOfMonth, endOfMonth, eachDayOfInterval, isSameMonth, isSameDay, addMonths, subMonths, startOfWeek, endOfWeek } from "date-fns";
|
|
||||||
import { fr } from "date-fns/locale";
|
|
||||||
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from "@/components/ui/dialog";
|
|
||||||
|
|
||||||
export default function AdminCalendrier() {
|
|
||||||
const [currentDate, setCurrentDate] = useState(new Date());
|
|
||||||
const [selectedSequence, setSelectedSequence] = useState<any>(null);
|
|
||||||
const [isDialogOpen, setIsDialogOpen] = useState(false);
|
|
||||||
|
|
||||||
const { data: sequences = [], isLoading } = trpc.sequences.list.useQuery();
|
|
||||||
const { data: formations = [] } = trpc.formations.list.useQuery();
|
|
||||||
|
|
||||||
const getFormationName = (formationId: number) => {
|
|
||||||
const formation = formations.find(f => f.id === formationId);
|
|
||||||
return formation?.nom || "Formation inconnue";
|
|
||||||
};
|
|
||||||
|
|
||||||
// Générer les jours du calendrier (incluant les jours du mois précédent/suivant pour remplir la grille)
|
|
||||||
const monthStart = startOfMonth(currentDate);
|
|
||||||
const monthEnd = endOfMonth(currentDate);
|
|
||||||
const calendarStart = startOfWeek(monthStart, { weekStartsOn: 1 }); // Commence le lundi
|
|
||||||
const calendarEnd = endOfWeek(monthEnd, { weekStartsOn: 1 });
|
|
||||||
const calendarDays = eachDayOfInterval({ start: calendarStart, end: calendarEnd });
|
|
||||||
|
|
||||||
// Obtenir les séquences pour un jour donné
|
|
||||||
const getSequencesForDay = (day: Date) => {
|
|
||||||
return sequences.filter(sequence => {
|
|
||||||
return sequence.dates.some((date: any) => {
|
|
||||||
const dateDebut = new Date(date.dateDebut);
|
|
||||||
return isSameDay(dateDebut, day);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const handlePreviousMonth = () => {
|
|
||||||
setCurrentDate(subMonths(currentDate, 1));
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleNextMonth = () => {
|
|
||||||
setCurrentDate(addMonths(currentDate, 1));
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleToday = () => {
|
|
||||||
setCurrentDate(new Date());
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleSequenceClick = (sequence: any) => {
|
|
||||||
setSelectedSequence(sequence);
|
|
||||||
setIsDialogOpen(true);
|
|
||||||
};
|
|
||||||
|
|
||||||
const getPublicCibleLabel = (publicCible: string) => {
|
|
||||||
switch (publicCible) {
|
|
||||||
case "directeur": return "Directeur";
|
|
||||||
case "chef_service": return "Chef de service";
|
|
||||||
case "tous": return "Tous";
|
|
||||||
case "autre": return "Autre";
|
|
||||||
default: return publicCible;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const getStatutBadge = (statut: string) => {
|
|
||||||
switch (statut) {
|
|
||||||
case "ouverte": return "bg-green-100 text-green-800";
|
|
||||||
case "bloquee": return "bg-orange-100 text-orange-800";
|
|
||||||
case "terminee": return "bg-gray-100 text-gray-800";
|
|
||||||
default: return "bg-gray-100 text-gray-800";
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<DashboardLayout>
|
|
||||||
<div className="space-y-6">
|
|
||||||
<div>
|
|
||||||
<h1 className="text-3xl font-bold tracking-tight">Calendrier des séquences</h1>
|
|
||||||
<p className="text-muted-foreground">
|
|
||||||
Vue mensuelle de toutes les séquences de formation planifiées
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<Card>
|
|
||||||
<CardHeader>
|
|
||||||
<div className="flex items-center justify-between">
|
|
||||||
<div>
|
|
||||||
<CardTitle className="text-2xl">
|
|
||||||
{format(currentDate, "MMMM yyyy", { locale: fr })}
|
|
||||||
</CardTitle>
|
|
||||||
<CardDescription>
|
|
||||||
{sequences.length} séquence(s) au total
|
|
||||||
</CardDescription>
|
|
||||||
</div>
|
|
||||||
<div className="flex gap-2">
|
|
||||||
<Button variant="outline" size="sm" onClick={handleToday}>
|
|
||||||
Aujourd'hui
|
|
||||||
</Button>
|
|
||||||
<Button variant="outline" size="icon" onClick={handlePreviousMonth}>
|
|
||||||
<ChevronLeft className="h-4 w-4" />
|
|
||||||
</Button>
|
|
||||||
<Button variant="outline" size="icon" onClick={handleNextMonth}>
|
|
||||||
<ChevronRight className="h-4 w-4" />
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</CardHeader>
|
|
||||||
<CardContent>
|
|
||||||
{isLoading ? (
|
|
||||||
<div className="text-center py-8 text-muted-foreground">Chargement...</div>
|
|
||||||
) : (
|
|
||||||
<div className="border rounded-lg overflow-hidden">
|
|
||||||
{/* En-tête des jours de la semaine */}
|
|
||||||
<div className="grid grid-cols-7 bg-muted">
|
|
||||||
{["Lun", "Mar", "Mer", "Jeu", "Ven", "Sam", "Dim"].map(day => (
|
|
||||||
<div key={day} className="p-2 text-center text-sm font-medium">
|
|
||||||
{day}
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Grille du calendrier */}
|
|
||||||
<div className="grid grid-cols-7 auto-rows-fr">
|
|
||||||
{calendarDays.map((day, index) => {
|
|
||||||
const daySequences = getSequencesForDay(day);
|
|
||||||
const isCurrentMonth = isSameMonth(day, currentDate);
|
|
||||||
const isToday = isSameDay(day, new Date());
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
key={index}
|
|
||||||
className={`min-h-[120px] border-t border-r p-2 ${
|
|
||||||
!isCurrentMonth ? "bg-muted/30" : ""
|
|
||||||
} ${isToday ? "bg-primary/5" : ""}`}
|
|
||||||
>
|
|
||||||
<div className={`text-sm font-medium mb-1 ${
|
|
||||||
!isCurrentMonth ? "text-muted-foreground" : ""
|
|
||||||
} ${isToday ? "text-primary font-bold" : ""}`}>
|
|
||||||
{format(day, "d")}
|
|
||||||
</div>
|
|
||||||
<div className="space-y-1">
|
|
||||||
{daySequences.map(sequence => (
|
|
||||||
<button
|
|
||||||
key={sequence.id}
|
|
||||||
onClick={() => handleSequenceClick(sequence)}
|
|
||||||
className="w-full text-left p-1 rounded text-xs bg-primary/10 hover:bg-primary/20 transition-colors"
|
|
||||||
>
|
|
||||||
<div className="font-medium truncate">{sequence.nom}</div>
|
|
||||||
<div className="text-muted-foreground truncate">
|
|
||||||
{getFormationName(sequence.formationId)}
|
|
||||||
</div>
|
|
||||||
</button>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
|
|
||||||
{/* Dialog de détails de la séquence */}
|
|
||||||
<Dialog open={isDialogOpen} onOpenChange={setIsDialogOpen}>
|
|
||||||
<DialogContent className="max-w-2xl">
|
|
||||||
<DialogHeader>
|
|
||||||
<DialogTitle>{selectedSequence?.nom}</DialogTitle>
|
|
||||||
<DialogDescription>
|
|
||||||
{selectedSequence && getFormationName(selectedSequence.formationId)}
|
|
||||||
</DialogDescription>
|
|
||||||
</DialogHeader>
|
|
||||||
{selectedSequence && (
|
|
||||||
<div className="space-y-4">
|
|
||||||
<div className="grid grid-cols-2 gap-4">
|
|
||||||
<div>
|
|
||||||
<p className="text-sm font-medium text-muted-foreground">Lieu</p>
|
|
||||||
<p>{selectedSequence.lieu}</p>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<p className="text-sm font-medium text-muted-foreground">Public cible</p>
|
|
||||||
<p>{getPublicCibleLabel(selectedSequence.publicCible)}</p>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<p className="text-sm font-medium text-muted-foreground">Formateur</p>
|
|
||||||
<p>{selectedSequence.formateur || "-"}</p>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<p className="text-sm font-medium text-muted-foreground">Capacité</p>
|
|
||||||
<p>{selectedSequence.nbInscrits || 0} / {selectedSequence.capaciteMax}</p>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<p className="text-sm font-medium text-muted-foreground">Statut</p>
|
|
||||||
<span className={`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium ${getStatutBadge(selectedSequence.statut)}`}>
|
|
||||||
{selectedSequence.statut}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<p className="text-sm font-medium text-muted-foreground mb-2">Dates de formation</p>
|
|
||||||
<div className="space-y-2">
|
|
||||||
{selectedSequence.dates.map((date: any) => (
|
|
||||||
<div key={date.id} className="p-2 bg-muted rounded">
|
|
||||||
<p className="font-medium">Date {date.ordre}</p>
|
|
||||||
<p className="text-sm">
|
|
||||||
Du {format(new Date(date.dateDebut), "PPP 'à' HH:mm", { locale: fr })}
|
|
||||||
</p>
|
|
||||||
<p className="text-sm">
|
|
||||||
au {format(new Date(date.dateFin), "PPP 'à' HH:mm", { locale: fr })}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</DialogContent>
|
|
||||||
</Dialog>
|
|
||||||
</div>
|
|
||||||
</DashboardLayout>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,318 +0,0 @@
|
|||||||
import { useState } from "react";
|
|
||||||
import DashboardLayout from "@/components/DashboardLayout";
|
|
||||||
import { Button } from "@/components/ui/button";
|
|
||||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
|
||||||
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog";
|
|
||||||
import { Input } from "@/components/ui/input";
|
|
||||||
import { Label } from "@/components/ui/label";
|
|
||||||
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table";
|
|
||||||
import { Textarea } from "@/components/ui/textarea";
|
|
||||||
import { Switch } from "@/components/ui/switch";
|
|
||||||
import { trpc } from "@/lib/trpc";
|
|
||||||
import { Plus, Pencil, Trash2, Bell, BellOff } from "lucide-react";
|
|
||||||
import { toast } from "sonner";
|
|
||||||
|
|
||||||
export default function AdminRappels() {
|
|
||||||
const [isCreateDialogOpen, setIsCreateDialogOpen] = useState(false);
|
|
||||||
const [isEditDialogOpen, setIsEditDialogOpen] = useState(false);
|
|
||||||
const [formData, setFormData] = useState({
|
|
||||||
nom: "",
|
|
||||||
joursAvant: 15,
|
|
||||||
emailTemplate: "",
|
|
||||||
actif: true,
|
|
||||||
});
|
|
||||||
const [editingId, setEditingId] = useState<number | null>(null);
|
|
||||||
|
|
||||||
const { data: rappels = [], isLoading, refetch } = trpc.rappels.list.useQuery();
|
|
||||||
const createMutation = trpc.rappels.create.useMutation();
|
|
||||||
const updateMutation = trpc.rappels.update.useMutation();
|
|
||||||
const deleteMutation = trpc.rappels.delete.useMutation();
|
|
||||||
|
|
||||||
const resetForm = () => {
|
|
||||||
setFormData({
|
|
||||||
nom: "",
|
|
||||||
joursAvant: 15,
|
|
||||||
emailTemplate: "",
|
|
||||||
actif: true,
|
|
||||||
});
|
|
||||||
setEditingId(null);
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleCreate = async () => {
|
|
||||||
try {
|
|
||||||
await createMutation.mutateAsync(formData);
|
|
||||||
toast.success("Rappel créé avec succès");
|
|
||||||
setIsCreateDialogOpen(false);
|
|
||||||
resetForm();
|
|
||||||
refetch();
|
|
||||||
} catch (error: any) {
|
|
||||||
toast.error(error.message || "Erreur lors de la création du rappel");
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleEdit = (rappel: any) => {
|
|
||||||
setFormData({
|
|
||||||
nom: rappel.nom,
|
|
||||||
joursAvant: rappel.joursAvant,
|
|
||||||
emailTemplate: rappel.emailTemplate,
|
|
||||||
actif: rappel.actif,
|
|
||||||
});
|
|
||||||
setEditingId(rappel.id);
|
|
||||||
setIsEditDialogOpen(true);
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleUpdate = async () => {
|
|
||||||
if (!editingId) return;
|
|
||||||
|
|
||||||
try {
|
|
||||||
await updateMutation.mutateAsync({ id: editingId, ...formData });
|
|
||||||
toast.success("Rappel mis à jour avec succès");
|
|
||||||
setIsEditDialogOpen(false);
|
|
||||||
resetForm();
|
|
||||||
refetch();
|
|
||||||
} catch (error: any) {
|
|
||||||
toast.error(error.message || "Erreur lors de la mise à jour du rappel");
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleDelete = async (id: number) => {
|
|
||||||
if (!confirm("Êtes-vous sûr de vouloir supprimer ce rappel ?")) return;
|
|
||||||
|
|
||||||
try {
|
|
||||||
await deleteMutation.mutateAsync({ id });
|
|
||||||
toast.success("Rappel supprimé avec succès");
|
|
||||||
refetch();
|
|
||||||
} catch (error: any) {
|
|
||||||
toast.error(error.message || "Erreur lors de la suppression du rappel");
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const templateExemple = `Bonjour {{prenom}} {{nom}},
|
|
||||||
|
|
||||||
Nous vous rappelons que votre formation "{{formationNom}}" - {{sequenceNom}} aura lieu dans {{joursAvant}} jours.
|
|
||||||
|
|
||||||
📅 Date : {{dateDebut}}
|
|
||||||
📍 Lieu : {{lieu}}
|
|
||||||
👨🏫 Formateur : {{formateur}}
|
|
||||||
|
|
||||||
Cordialement,
|
|
||||||
L'équipe Formation Manager Itinova`;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<DashboardLayout>
|
|
||||||
<div className="space-y-6">
|
|
||||||
<div className="flex items-center justify-between">
|
|
||||||
<div>
|
|
||||||
<h1 className="text-3xl font-bold tracking-tight">Rappels automatiques</h1>
|
|
||||||
<p className="text-muted-foreground">
|
|
||||||
Configurez les rappels envoyés automatiquement avant les formations
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<Dialog open={isCreateDialogOpen} onOpenChange={setIsCreateDialogOpen}>
|
|
||||||
<DialogTrigger asChild>
|
|
||||||
<Button onClick={() => resetForm()}>
|
|
||||||
<Plus className="mr-2 h-4 w-4" />
|
|
||||||
Nouveau rappel
|
|
||||||
</Button>
|
|
||||||
</DialogTrigger>
|
|
||||||
<DialogContent className="max-w-2xl">
|
|
||||||
<DialogHeader>
|
|
||||||
<DialogTitle>Créer un rappel</DialogTitle>
|
|
||||||
<DialogDescription>
|
|
||||||
Configurez un nouveau rappel automatique à envoyer avant les formations
|
|
||||||
</DialogDescription>
|
|
||||||
</DialogHeader>
|
|
||||||
<div className="space-y-4">
|
|
||||||
<div>
|
|
||||||
<Label htmlFor="nom">Nom du rappel</Label>
|
|
||||||
<Input
|
|
||||||
id="nom"
|
|
||||||
placeholder="Ex: Rappel J-15"
|
|
||||||
value={formData.nom}
|
|
||||||
onChange={(e) => setFormData({ ...formData, nom: e.target.value })}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<Label htmlFor="joursAvant">Jours avant la formation</Label>
|
|
||||||
<Input
|
|
||||||
id="joursAvant"
|
|
||||||
type="number"
|
|
||||||
min="1"
|
|
||||||
placeholder="15"
|
|
||||||
value={formData.joursAvant}
|
|
||||||
onChange={(e) => setFormData({ ...formData, joursAvant: parseInt(e.target.value) || 0 })}
|
|
||||||
/>
|
|
||||||
<p className="text-sm text-muted-foreground mt-1">
|
|
||||||
Nombre de jours avant la première date de formation
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<Label htmlFor="emailTemplate">Template d'email</Label>
|
|
||||||
<Textarea
|
|
||||||
id="emailTemplate"
|
|
||||||
placeholder={templateExemple}
|
|
||||||
value={formData.emailTemplate}
|
|
||||||
onChange={(e) => setFormData({ ...formData, emailTemplate: e.target.value })}
|
|
||||||
rows={10}
|
|
||||||
/>
|
|
||||||
<p className="text-sm text-muted-foreground mt-1">
|
|
||||||
Variables disponibles : {"{{"} prenom {"}}"}, {"{{"} nom {"}}"}, {"{{"} formationNom {"}}"}, {"{{"} sequenceNom {"}}"}, {"{{"} dateDebut {"}}"}, {"{{"} lieu {"}}"}, {"{{"} formateur {"}}"}, {"{{"} joursAvant {"}}"}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div className="flex items-center space-x-2">
|
|
||||||
<Switch
|
|
||||||
id="actif"
|
|
||||||
checked={formData.actif}
|
|
||||||
onCheckedChange={(checked) => setFormData({ ...formData, actif: checked })}
|
|
||||||
/>
|
|
||||||
<Label htmlFor="actif">Activer ce rappel</Label>
|
|
||||||
</div>
|
|
||||||
<div className="flex justify-end gap-2">
|
|
||||||
<Button variant="outline" onClick={() => setIsCreateDialogOpen(false)}>
|
|
||||||
Annuler
|
|
||||||
</Button>
|
|
||||||
<Button onClick={handleCreate} disabled={createMutation.isPending}>
|
|
||||||
{createMutation.isPending ? "Création..." : "Créer"}
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</DialogContent>
|
|
||||||
</Dialog>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<Card>
|
|
||||||
<CardHeader>
|
|
||||||
<CardTitle>Liste des rappels</CardTitle>
|
|
||||||
<CardDescription>
|
|
||||||
Gérez les rappels automatiques envoyés aux apprenants avant les formations
|
|
||||||
</CardDescription>
|
|
||||||
</CardHeader>
|
|
||||||
<CardContent>
|
|
||||||
{isLoading ? (
|
|
||||||
<div className="text-center py-8 text-muted-foreground">Chargement...</div>
|
|
||||||
) : rappels.length === 0 ? (
|
|
||||||
<div className="text-center py-8 text-muted-foreground">
|
|
||||||
Aucun rappel configuré. Créez votre premier rappel pour commencer.
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
<Table>
|
|
||||||
<TableHeader>
|
|
||||||
<TableRow>
|
|
||||||
<TableHead>Nom</TableHead>
|
|
||||||
<TableHead>Jours avant</TableHead>
|
|
||||||
<TableHead>Statut</TableHead>
|
|
||||||
<TableHead className="text-right">Actions</TableHead>
|
|
||||||
</TableRow>
|
|
||||||
</TableHeader>
|
|
||||||
<TableBody>
|
|
||||||
{rappels.map((rappel) => (
|
|
||||||
<TableRow key={rappel.id}>
|
|
||||||
<TableCell className="font-medium">{rappel.nom}</TableCell>
|
|
||||||
<TableCell>J-{rappel.joursAvant}</TableCell>
|
|
||||||
<TableCell>
|
|
||||||
{rappel.actif ? (
|
|
||||||
<span className="inline-flex items-center gap-1 text-green-600">
|
|
||||||
<Bell className="h-4 w-4" />
|
|
||||||
Actif
|
|
||||||
</span>
|
|
||||||
) : (
|
|
||||||
<span className="inline-flex items-center gap-1 text-gray-500">
|
|
||||||
<BellOff className="h-4 w-4" />
|
|
||||||
Inactif
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
</TableCell>
|
|
||||||
<TableCell className="text-right">
|
|
||||||
<div className="flex justify-end gap-2">
|
|
||||||
<Button
|
|
||||||
variant="outline"
|
|
||||||
size="sm"
|
|
||||||
onClick={() => handleEdit(rappel)}
|
|
||||||
>
|
|
||||||
<Pencil className="h-4 w-4" />
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
variant="outline"
|
|
||||||
size="sm"
|
|
||||||
onClick={() => handleDelete(rappel.id)}
|
|
||||||
>
|
|
||||||
<Trash2 className="h-4 w-4" />
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</TableCell>
|
|
||||||
</TableRow>
|
|
||||||
))}
|
|
||||||
</TableBody>
|
|
||||||
</Table>
|
|
||||||
)}
|
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
|
|
||||||
{/* Dialog de modification */}
|
|
||||||
<Dialog open={isEditDialogOpen} onOpenChange={setIsEditDialogOpen}>
|
|
||||||
<DialogContent className="max-w-2xl">
|
|
||||||
<DialogHeader>
|
|
||||||
<DialogTitle>Modifier le rappel</DialogTitle>
|
|
||||||
<DialogDescription>
|
|
||||||
Modifiez les paramètres du rappel automatique
|
|
||||||
</DialogDescription>
|
|
||||||
</DialogHeader>
|
|
||||||
<div className="space-y-4">
|
|
||||||
<div>
|
|
||||||
<Label htmlFor="edit-nom">Nom du rappel</Label>
|
|
||||||
<Input
|
|
||||||
id="edit-nom"
|
|
||||||
placeholder="Ex: Rappel J-15"
|
|
||||||
value={formData.nom}
|
|
||||||
onChange={(e) => setFormData({ ...formData, nom: e.target.value })}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<Label htmlFor="edit-joursAvant">Jours avant la formation</Label>
|
|
||||||
<Input
|
|
||||||
id="edit-joursAvant"
|
|
||||||
type="number"
|
|
||||||
min="1"
|
|
||||||
placeholder="15"
|
|
||||||
value={formData.joursAvant}
|
|
||||||
onChange={(e) => setFormData({ ...formData, joursAvant: parseInt(e.target.value) || 0 })}
|
|
||||||
/>
|
|
||||||
<p className="text-sm text-muted-foreground mt-1">
|
|
||||||
Nombre de jours avant la première date de formation
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<Label htmlFor="edit-emailTemplate">Template d'email</Label>
|
|
||||||
<Textarea
|
|
||||||
id="edit-emailTemplate"
|
|
||||||
value={formData.emailTemplate}
|
|
||||||
onChange={(e) => setFormData({ ...formData, emailTemplate: e.target.value })}
|
|
||||||
rows={10}
|
|
||||||
/>
|
|
||||||
<p className="text-sm text-muted-foreground mt-1">
|
|
||||||
Variables disponibles : {"{{"} prenom {"}}"}, {"{{"} nom {"}}"}, {"{{"} formationNom {"}}"}, {"{{"} sequenceNom {"}}"}, {"{{"} dateDebut {"}}"}, {"{{"} lieu {"}}"}, {"{{"} formateur {"}}"}, {"{{"} joursAvant {"}}"}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div className="flex items-center space-x-2">
|
|
||||||
<Switch
|
|
||||||
id="edit-actif"
|
|
||||||
checked={formData.actif}
|
|
||||||
onCheckedChange={(checked) => setFormData({ ...formData, actif: checked })}
|
|
||||||
/>
|
|
||||||
<Label htmlFor="edit-actif">Activer ce rappel</Label>
|
|
||||||
</div>
|
|
||||||
<div className="flex justify-end gap-2">
|
|
||||||
<Button variant="outline" onClick={() => setIsEditDialogOpen(false)}>
|
|
||||||
Annuler
|
|
||||||
</Button>
|
|
||||||
<Button onClick={handleUpdate} disabled={updateMutation.isPending}>
|
|
||||||
{updateMutation.isPending ? "Mise à jour..." : "Mettre à jour"}
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</DialogContent>
|
|
||||||
</Dialog>
|
|
||||||
</div>
|
|
||||||
</DashboardLayout>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -62,7 +62,6 @@ export default function AdminRapportPublicCible() {
|
|||||||
const labels = {
|
const labels = {
|
||||||
directeur: "Directeur",
|
directeur: "Directeur",
|
||||||
chef_service: "Chef de service",
|
chef_service: "Chef de service",
|
||||||
tous: "Tous",
|
|
||||||
autre: "Autre",
|
autre: "Autre",
|
||||||
};
|
};
|
||||||
return labels[publicCible as keyof typeof labels] || "Autre";
|
return labels[publicCible as keyof typeof labels] || "Autre";
|
||||||
@@ -72,7 +71,6 @@ export default function AdminRapportPublicCible() {
|
|||||||
const colors = {
|
const colors = {
|
||||||
directeur: "bg-blue-100 text-blue-800",
|
directeur: "bg-blue-100 text-blue-800",
|
||||||
chef_service: "bg-green-100 text-green-800",
|
chef_service: "bg-green-100 text-green-800",
|
||||||
tous: "bg-purple-100 text-purple-800",
|
|
||||||
autre: "bg-gray-100 text-gray-800",
|
autre: "bg-gray-100 text-gray-800",
|
||||||
};
|
};
|
||||||
return colors[publicCible as keyof typeof colors] || colors.autre;
|
return colors[publicCible as keyof typeof colors] || colors.autre;
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ export default function AdminSequenceInscrits() {
|
|||||||
const colors = {
|
const colors = {
|
||||||
directeur: "bg-blue-100 text-blue-800",
|
directeur: "bg-blue-100 text-blue-800",
|
||||||
chef_service: "bg-green-100 text-green-800",
|
chef_service: "bg-green-100 text-green-800",
|
||||||
tous: "bg-purple-100 text-purple-800",
|
|
||||||
autre: "bg-gray-100 text-gray-800",
|
autre: "bg-gray-100 text-gray-800",
|
||||||
};
|
};
|
||||||
return colors[publicCible as keyof typeof colors] || colors.autre;
|
return colors[publicCible as keyof typeof colors] || colors.autre;
|
||||||
@@ -31,7 +30,6 @@ export default function AdminSequenceInscrits() {
|
|||||||
const labels = {
|
const labels = {
|
||||||
directeur: "Directeur",
|
directeur: "Directeur",
|
||||||
chef_service: "Chef de service",
|
chef_service: "Chef de service",
|
||||||
tous: "Tous",
|
|
||||||
autre: "Autre",
|
autre: "Autre",
|
||||||
};
|
};
|
||||||
return labels[publicCible as keyof typeof labels] || "Autre";
|
return labels[publicCible as keyof typeof labels] || "Autre";
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import { useState, useMemo } from "react";
|
import { useState, useMemo } from "react";
|
||||||
import DashboardLayout from "@/components/DashboardLayout";
|
import DashboardLayout from "@/components/DashboardLayout";
|
||||||
import { FormateurCombobox } from "@/components/FormateurCombobox";
|
|
||||||
import { CapacityProgressBar } from "@/components/CapacityProgressBar";
|
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
||||||
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog";
|
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog";
|
||||||
@@ -36,8 +34,7 @@ export default function AdminSequences() {
|
|||||||
formationId: "",
|
formationId: "",
|
||||||
nom: "",
|
nom: "",
|
||||||
lieu: "",
|
lieu: "",
|
||||||
publicCible: "autre" as "directeur" | "chef_service" | "tous" | "autre",
|
publicCible: "autre" as "directeur" | "chef_service" | "autre",
|
||||||
formateur: "",
|
|
||||||
capaciteMax: "12",
|
capaciteMax: "12",
|
||||||
dateBlocage: "",
|
dateBlocage: "",
|
||||||
statut: "ouverte" as "ouverte" | "bloquee" | "terminee",
|
statut: "ouverte" as "ouverte" | "bloquee" | "terminee",
|
||||||
@@ -91,7 +88,6 @@ export default function AdminSequences() {
|
|||||||
nom: "",
|
nom: "",
|
||||||
lieu: "",
|
lieu: "",
|
||||||
publicCible: "autre",
|
publicCible: "autre",
|
||||||
formateur: "",
|
|
||||||
capaciteMax: "12",
|
capaciteMax: "12",
|
||||||
dateBlocage: "",
|
dateBlocage: "",
|
||||||
statut: "ouverte",
|
statut: "ouverte",
|
||||||
@@ -143,7 +139,6 @@ export default function AdminSequences() {
|
|||||||
nom: sequence.nom || "",
|
nom: sequence.nom || "",
|
||||||
lieu: sequence.lieu || "",
|
lieu: sequence.lieu || "",
|
||||||
publicCible: sequence.publicCible || "autre",
|
publicCible: sequence.publicCible || "autre",
|
||||||
formateur: sequence.formateur || "",
|
|
||||||
capaciteMax: sequence.capaciteMax?.toString() || "12",
|
capaciteMax: sequence.capaciteMax?.toString() || "12",
|
||||||
dateBlocage: safeFormatDate(sequence.dateBlocage),
|
dateBlocage: safeFormatDate(sequence.dateBlocage),
|
||||||
statut: sequence.statut || "ouverte",
|
statut: sequence.statut || "ouverte",
|
||||||
@@ -169,7 +164,6 @@ export default function AdminSequences() {
|
|||||||
nom: formData.nom,
|
nom: formData.nom,
|
||||||
lieu: formData.lieu,
|
lieu: formData.lieu,
|
||||||
publicCible: formData.publicCible,
|
publicCible: formData.publicCible,
|
||||||
formateur: formData.formateur || undefined,
|
|
||||||
capaciteMax: parseInt(formData.capaciteMax),
|
capaciteMax: parseInt(formData.capaciteMax),
|
||||||
dateBlocage: formData.dateBlocage,
|
dateBlocage: formData.dateBlocage,
|
||||||
statut: formData.statut,
|
statut: formData.statut,
|
||||||
@@ -298,7 +292,6 @@ export default function AdminSequences() {
|
|||||||
const colors = {
|
const colors = {
|
||||||
directeur: "bg-blue-100 text-blue-800",
|
directeur: "bg-blue-100 text-blue-800",
|
||||||
chef_service: "bg-green-100 text-green-800",
|
chef_service: "bg-green-100 text-green-800",
|
||||||
tous: "bg-purple-100 text-purple-800",
|
|
||||||
autre: "bg-gray-100 text-gray-800",
|
autre: "bg-gray-100 text-gray-800",
|
||||||
};
|
};
|
||||||
return colors[publicCible as keyof typeof colors] || colors.autre;
|
return colors[publicCible as keyof typeof colors] || colors.autre;
|
||||||
@@ -308,7 +301,6 @@ export default function AdminSequences() {
|
|||||||
const labels = {
|
const labels = {
|
||||||
directeur: "Directeur",
|
directeur: "Directeur",
|
||||||
chef_service: "Chef de service",
|
chef_service: "Chef de service",
|
||||||
tous: "Tous",
|
|
||||||
autre: "Autre",
|
autre: "Autre",
|
||||||
};
|
};
|
||||||
return labels[publicCible as keyof typeof labels] || "Autre";
|
return labels[publicCible as keyof typeof labels] || "Autre";
|
||||||
@@ -331,7 +323,7 @@ export default function AdminSequences() {
|
|||||||
Nouvelle Séquence
|
Nouvelle Séquence
|
||||||
</Button>
|
</Button>
|
||||||
</DialogTrigger>
|
</DialogTrigger>
|
||||||
<DialogContent className="max-w-4xl max-h-[90vh] overflow-y-auto">
|
<DialogContent className="max-w-3xl max-h-[90vh] overflow-y-auto">
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle>Créer une nouvelle séquence</DialogTitle>
|
<DialogTitle>Créer une nouvelle séquence</DialogTitle>
|
||||||
<DialogDescription>
|
<DialogDescription>
|
||||||
@@ -386,7 +378,7 @@ export default function AdminSequences() {
|
|||||||
<Label htmlFor="publicCible">Public cible *</Label>
|
<Label htmlFor="publicCible">Public cible *</Label>
|
||||||
<Select
|
<Select
|
||||||
value={formData.publicCible}
|
value={formData.publicCible}
|
||||||
onValueChange={(value: "directeur" | "chef_service" | "tous" | "autre") => setFormData({ ...formData, publicCible: value })}
|
onValueChange={(value: "directeur" | "chef_service" | "autre") => setFormData({ ...formData, publicCible: value })}
|
||||||
>
|
>
|
||||||
<SelectTrigger id="publicCible">
|
<SelectTrigger id="publicCible">
|
||||||
<SelectValue placeholder="Sélectionner le public cible" />
|
<SelectValue placeholder="Sélectionner le public cible" />
|
||||||
@@ -394,22 +386,10 @@ export default function AdminSequences() {
|
|||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectItem value="directeur">Directeur</SelectItem>
|
<SelectItem value="directeur">Directeur</SelectItem>
|
||||||
<SelectItem value="chef_service">Chef de service</SelectItem>
|
<SelectItem value="chef_service">Chef de service</SelectItem>
|
||||||
<SelectItem value="tous">Tous</SelectItem>
|
|
||||||
<SelectItem value="autre">Autre</SelectItem>
|
<SelectItem value="autre">Autre</SelectItem>
|
||||||
</SelectContent>
|
</SelectContent>
|
||||||
</Select>
|
</Select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="grid grid-cols-2 gap-4">
|
|
||||||
<div className="space-y-2">
|
|
||||||
<Label htmlFor="formateur">Formateur</Label>
|
|
||||||
<FormateurCombobox
|
|
||||||
value={formData.formateur}
|
|
||||||
onChange={(value) => setFormData({ ...formData, formateur: value })}
|
|
||||||
placeholder="Sélectionner un formateur (optionnel)"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor="capaciteMax">Capacité maximale *</Label>
|
<Label htmlFor="capaciteMax">Capacité maximale *</Label>
|
||||||
@@ -637,7 +617,6 @@ export default function AdminSequences() {
|
|||||||
<TableHead>Dates</TableHead>
|
<TableHead>Dates</TableHead>
|
||||||
<TableHead>Lieu</TableHead>
|
<TableHead>Lieu</TableHead>
|
||||||
<TableHead>Public cible</TableHead>
|
<TableHead>Public cible</TableHead>
|
||||||
<TableHead>Formateur</TableHead>
|
|
||||||
<TableHead>Capacité</TableHead>
|
<TableHead>Capacité</TableHead>
|
||||||
<TableHead>Statut</TableHead>
|
<TableHead>Statut</TableHead>
|
||||||
<TableHead className="text-right">Actions</TableHead>
|
<TableHead className="text-right">Actions</TableHead>
|
||||||
@@ -664,13 +643,7 @@ export default function AdminSequences() {
|
|||||||
{getPublicCibleLabel(sequence.publicCible)}
|
{getPublicCibleLabel(sequence.publicCible)}
|
||||||
</span>
|
</span>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell className="max-w-xs truncate">{sequence.formateur || "-"}</TableCell>
|
<TableCell>{sequence.capaciteMax}</TableCell>
|
||||||
<TableCell>
|
|
||||||
<CapacityProgressBar
|
|
||||||
current={sequence.nbInscrits || 0}
|
|
||||||
max={sequence.capaciteMax}
|
|
||||||
/>
|
|
||||||
</TableCell>
|
|
||||||
<TableCell>
|
<TableCell>
|
||||||
<span className={`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium ${getStatutBadge(sequence.statut)}`}>
|
<span className={`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium ${getStatutBadge(sequence.statut)}`}>
|
||||||
{sequence.statut}
|
{sequence.statut}
|
||||||
@@ -712,7 +685,7 @@ export default function AdminSequences() {
|
|||||||
|
|
||||||
{/* Dialog d'édition */}
|
{/* Dialog d'édition */}
|
||||||
<Dialog open={isEditOpen} onOpenChange={setIsEditOpen}>
|
<Dialog open={isEditOpen} onOpenChange={setIsEditOpen}>
|
||||||
<DialogContent className="max-w-4xl max-h-[90vh] overflow-y-auto">
|
<DialogContent className="max-w-3xl max-h-[90vh] overflow-y-auto">
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle>Modifier la séquence</DialogTitle>
|
<DialogTitle>Modifier la séquence</DialogTitle>
|
||||||
<DialogDescription>
|
<DialogDescription>
|
||||||
@@ -761,6 +734,21 @@ export default function AdminSequences() {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="space-y-2">
|
||||||
|
<Label htmlFor="edit-capaciteMax">Capacité maximale *</Label>
|
||||||
|
<Input
|
||||||
|
id="edit-capaciteMax"
|
||||||
|
type="number"
|
||||||
|
min="1"
|
||||||
|
max="50"
|
||||||
|
value={formData.capaciteMax}
|
||||||
|
onChange={(e) => setFormData({ ...formData, capaciteMax: e.target.value })}
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="grid grid-cols-2 gap-4">
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor="edit-publicCible">Public cible *</Label>
|
<Label htmlFor="edit-publicCible">Public cible *</Label>
|
||||||
<Select
|
<Select
|
||||||
@@ -778,9 +766,7 @@ export default function AdminSequences() {
|
|||||||
</SelectContent>
|
</SelectContent>
|
||||||
</Select>
|
</Select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="grid grid-cols-2 gap-4">
|
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor="edit-formateur">Formateur</Label>
|
<Label htmlFor="edit-formateur">Formateur</Label>
|
||||||
<FormateurCombobox
|
<FormateurCombobox
|
||||||
@@ -789,19 +775,6 @@ export default function AdminSequences() {
|
|||||||
placeholder="Sélectionner un formateur (optionnel)"
|
placeholder="Sélectionner un formateur (optionnel)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="space-y-2">
|
|
||||||
<Label htmlFor="edit-capaciteMax">Capacité maximale *</Label>
|
|
||||||
<Input
|
|
||||||
id="edit-capaciteMax"
|
|
||||||
type="number"
|
|
||||||
min="1"
|
|
||||||
max="50"
|
|
||||||
value={formData.capaciteMax}
|
|
||||||
onChange={(e) => setFormData({ ...formData, capaciteMax: e.target.value })}
|
|
||||||
required
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="grid grid-cols-2 gap-4">
|
<div className="grid grid-cols-2 gap-4">
|
||||||
|
|||||||
@@ -68,15 +68,12 @@ export default function Inscription() {
|
|||||||
const publicCibleMap: Record<string, string> = {
|
const publicCibleMap: Record<string, string> = {
|
||||||
"directeur": "directeur",
|
"directeur": "directeur",
|
||||||
"chef_service": "chef_service",
|
"chef_service": "chef_service",
|
||||||
"tous": "tous",
|
|
||||||
"autre": "autre"
|
"autre": "autre"
|
||||||
};
|
};
|
||||||
|
|
||||||
// Si le public cible est "tous", ne pas afficher d'alerte
|
if (publicCibleMap[selectedSequence.publicCible] !== formData.fonction) {
|
||||||
if (selectedSequence.publicCible !== "tous" && publicCibleMap[selectedSequence.publicCible] !== formData.fonction) {
|
|
||||||
const publicCibleLabel = selectedSequence.publicCible === "directeur" ? "Directeurs" :
|
const publicCibleLabel = selectedSequence.publicCible === "directeur" ? "Directeurs" :
|
||||||
selectedSequence.publicCible === "chef_service" ? "Chefs de service" :
|
selectedSequence.publicCible === "chef_service" ? "Chefs de service" : "Autre";
|
||||||
selectedSequence.publicCible === "tous" ? "Tous" : "Autre";
|
|
||||||
const fonctionLabel = formData.fonction === "directeur" ? "Directeur" :
|
const fonctionLabel = formData.fonction === "directeur" ? "Directeur" :
|
||||||
formData.fonction === "chef_service" ? "Chef de service" : "Autre";
|
formData.fonction === "chef_service" ? "Chef de service" : "Autre";
|
||||||
|
|
||||||
@@ -303,7 +300,7 @@ export default function Inscription() {
|
|||||||
</div>
|
</div>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<Users className="w-4 h-4" />
|
<Users className="w-4 h-4" />
|
||||||
<span>Public cible : {sequence.publicCible === "directeur" ? "Directeurs" : sequence.publicCible === "chef_service" ? "Chefs de service" : sequence.publicCible === "tous" ? "Tous" : "Autre"}</span>
|
<span>Public cible : {sequence.publicCible === "directeur" ? "Directeurs" : sequence.publicCible === "chef_service" ? "Chefs de service" : "Autre"}</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<Users className="w-4 h-4" />
|
<Users className="w-4 h-4" />
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
ALTER TABLE `users` DROP INDEX `users_openId_unique`;--> statement-breakpoint
|
|
||||||
ALTER TABLE `users` MODIFY COLUMN `email` varchar(320) NOT NULL;--> statement-breakpoint
|
|
||||||
ALTER TABLE `users` ADD `password` varchar(255) NOT NULL;--> statement-breakpoint
|
|
||||||
ALTER TABLE `users` ADD `emailVerified` boolean DEFAULT false NOT NULL;--> statement-breakpoint
|
|
||||||
ALTER TABLE `users` ADD CONSTRAINT `users_email_unique` UNIQUE(`email`);--> statement-breakpoint
|
|
||||||
ALTER TABLE `users` DROP COLUMN `openId`;--> statement-breakpoint
|
|
||||||
ALTER TABLE `users` DROP COLUMN `loginMethod`;
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
ALTER TABLE `users` MODIFY COLUMN `password` varchar(255);--> statement-breakpoint
|
|
||||||
ALTER TABLE `users` ADD `openId` varchar(64);--> statement-breakpoint
|
|
||||||
ALTER TABLE `users` ADD CONSTRAINT `users_openId_unique` UNIQUE(`openId`);
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
ALTER TABLE `users` DROP INDEX `users_openId_unique`;--> statement-breakpoint
|
|
||||||
ALTER TABLE `users` MODIFY COLUMN `password` varchar(255) NOT NULL;--> statement-breakpoint
|
|
||||||
ALTER TABLE `users` DROP COLUMN `openId`;
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
ALTER TABLE `sequences` MODIFY COLUMN `publicCible` enum('directeur','chef_service','tous','autre') NOT NULL;
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
ALTER TABLE `sequences` ADD `formateur` varchar(255);
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
CREATE TABLE `formateurs` (
|
|
||||||
`id` int AUTO_INCREMENT NOT NULL,
|
|
||||||
`nom` varchar(255) NOT NULL,
|
|
||||||
`actif` boolean NOT NULL DEFAULT true,
|
|
||||||
`createdAt` timestamp NOT NULL DEFAULT (now()),
|
|
||||||
`updatedAt` timestamp NOT NULL DEFAULT (now()) ON UPDATE CURRENT_TIMESTAMP,
|
|
||||||
CONSTRAINT `formateurs_id` PRIMARY KEY(`id`),
|
|
||||||
CONSTRAINT `formateurs_nom_unique` UNIQUE(`nom`)
|
|
||||||
);
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
CREATE TABLE `rappels` (
|
|
||||||
`id` int AUTO_INCREMENT NOT NULL,
|
|
||||||
`nom` varchar(255) NOT NULL,
|
|
||||||
`joursAvant` int NOT NULL,
|
|
||||||
`emailTemplate` text NOT NULL,
|
|
||||||
`actif` boolean NOT NULL DEFAULT true,
|
|
||||||
`createdAt` timestamp NOT NULL DEFAULT (now()),
|
|
||||||
`updatedAt` timestamp NOT NULL DEFAULT (now()) ON UPDATE CURRENT_TIMESTAMP,
|
|
||||||
CONSTRAINT `rappels_id` PRIMARY KEY(`id`)
|
|
||||||
);
|
|
||||||
--> statement-breakpoint
|
|
||||||
CREATE TABLE `rappelsEnvoyes` (
|
|
||||||
`id` int AUTO_INCREMENT NOT NULL,
|
|
||||||
`rappelId` int NOT NULL,
|
|
||||||
`inscriptionId` int NOT NULL,
|
|
||||||
`dateEnvoi` timestamp NOT NULL DEFAULT (now()),
|
|
||||||
CONSTRAINT `rappelsEnvoyes_id` PRIMARY KEY(`id`)
|
|
||||||
);
|
|
||||||
@@ -1,780 +0,0 @@
|
|||||||
{
|
|
||||||
"version": "5",
|
|
||||||
"dialect": "mysql",
|
|
||||||
"id": "e34c8fec-5308-4ce7-b687-d27c3093036c",
|
|
||||||
"prevId": "a099e856-0b0c-430d-8160-ca950c994fe5",
|
|
||||||
"tables": {
|
|
||||||
"apprenants": {
|
|
||||||
"name": "apprenants",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"nom": {
|
|
||||||
"name": "nom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"prenom": {
|
|
||||||
"name": "prenom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(320)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"codeEtablissement": {
|
|
||||||
"name": "codeEtablissement",
|
|
||||||
"type": "varchar(50)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"fonction": {
|
|
||||||
"name": "fonction",
|
|
||||||
"type": "enum('directeur','chef_service','autre')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"apprenants_id": {
|
|
||||||
"name": "apprenants_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"apprenants_email_unique": {
|
|
||||||
"name": "apprenants_email_unique",
|
|
||||||
"columns": [
|
|
||||||
"email"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"datesFormation": {
|
|
||||||
"name": "datesFormation",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"sequenceId": {
|
|
||||||
"name": "sequenceId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"dateDebut": {
|
|
||||||
"name": "dateDebut",
|
|
||||||
"type": "datetime",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"dateFin": {
|
|
||||||
"name": "dateFin",
|
|
||||||
"type": "datetime",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"ordre": {
|
|
||||||
"name": "ordre",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"datesFormation_id": {
|
|
||||||
"name": "datesFormation_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"emailConfig": {
|
|
||||||
"name": "emailConfig",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"provider": {
|
|
||||||
"name": "provider",
|
|
||||||
"type": "varchar(50)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'resend'"
|
|
||||||
},
|
|
||||||
"apiKey": {
|
|
||||||
"name": "apiKey",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"fromEmail": {
|
|
||||||
"name": "fromEmail",
|
|
||||||
"type": "varchar(320)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"fromName": {
|
|
||||||
"name": "fromName",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'Formation Manager Itinova'"
|
|
||||||
},
|
|
||||||
"mode": {
|
|
||||||
"name": "mode",
|
|
||||||
"type": "enum('simulation','production')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'simulation'"
|
|
||||||
},
|
|
||||||
"domainVerified": {
|
|
||||||
"name": "domainVerified",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": false
|
|
||||||
},
|
|
||||||
"active": {
|
|
||||||
"name": "active",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"emailConfig_id": {
|
|
||||||
"name": "emailConfig_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"emailTemplates": {
|
|
||||||
"name": "emailTemplates",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"type": {
|
|
||||||
"name": "type",
|
|
||||||
"type": "varchar(50)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"logoUrl": {
|
|
||||||
"name": "logoUrl",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"primaryColor": {
|
|
||||||
"name": "primaryColor",
|
|
||||||
"type": "varchar(7)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'#2563eb'"
|
|
||||||
},
|
|
||||||
"headerBgColor": {
|
|
||||||
"name": "headerBgColor",
|
|
||||||
"type": "varchar(7)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'#2563eb'"
|
|
||||||
},
|
|
||||||
"headerTextColor": {
|
|
||||||
"name": "headerTextColor",
|
|
||||||
"type": "varchar(7)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'#ffffff'"
|
|
||||||
},
|
|
||||||
"headerTitle": {
|
|
||||||
"name": "headerTitle",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'Formation Manager Itinova'"
|
|
||||||
},
|
|
||||||
"footerText": {
|
|
||||||
"name": "footerText",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"active": {
|
|
||||||
"name": "active",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"emailTemplates_id": {
|
|
||||||
"name": "emailTemplates_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"emailTemplates_type_unique": {
|
|
||||||
"name": "emailTemplates_type_unique",
|
|
||||||
"columns": [
|
|
||||||
"type"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"formations": {
|
|
||||||
"name": "formations",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"nom": {
|
|
||||||
"name": "nom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"description": {
|
|
||||||
"name": "description",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"lienUnique": {
|
|
||||||
"name": "lienUnique",
|
|
||||||
"type": "varchar(100)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"actif": {
|
|
||||||
"name": "actif",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"formations_id": {
|
|
||||||
"name": "formations_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"formations_lienUnique_unique": {
|
|
||||||
"name": "formations_lienUnique_unique",
|
|
||||||
"columns": [
|
|
||||||
"lienUnique"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"inscriptions": {
|
|
||||||
"name": "inscriptions",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"apprenantId": {
|
|
||||||
"name": "apprenantId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"sequenceId": {
|
|
||||||
"name": "sequenceId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"statut": {
|
|
||||||
"name": "statut",
|
|
||||||
"type": "enum('confirmee','liste_attente','annulee')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"dateInscription": {
|
|
||||||
"name": "dateInscription",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"inscriptions_id": {
|
|
||||||
"name": "inscriptions_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"passwordResetTokens": {
|
|
||||||
"name": "passwordResetTokens",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"userId": {
|
|
||||||
"name": "userId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"token": {
|
|
||||||
"name": "token",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"expiresAt": {
|
|
||||||
"name": "expiresAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"used": {
|
|
||||||
"name": "used",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": false
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"passwordResetTokens_id": {
|
|
||||||
"name": "passwordResetTokens_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"passwordResetTokens_token_unique": {
|
|
||||||
"name": "passwordResetTokens_token_unique",
|
|
||||||
"columns": [
|
|
||||||
"token"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"sequences": {
|
|
||||||
"name": "sequences",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"formationId": {
|
|
||||||
"name": "formationId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"nom": {
|
|
||||||
"name": "nom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"lieu": {
|
|
||||||
"name": "lieu",
|
|
||||||
"type": "varchar(500)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"publicCible": {
|
|
||||||
"name": "publicCible",
|
|
||||||
"type": "enum('directeur','chef_service','autre')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"capaciteMax": {
|
|
||||||
"name": "capaciteMax",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": 12
|
|
||||||
},
|
|
||||||
"dateBlocage": {
|
|
||||||
"name": "dateBlocage",
|
|
||||||
"type": "datetime",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"statut": {
|
|
||||||
"name": "statut",
|
|
||||||
"type": "enum('ouverte','bloquee','terminee')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'ouverte'"
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"sequences_id": {
|
|
||||||
"name": "sequences_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"users": {
|
|
||||||
"name": "users",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(320)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"password": {
|
|
||||||
"name": "password",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"emailVerified": {
|
|
||||||
"name": "emailVerified",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": false
|
|
||||||
},
|
|
||||||
"role": {
|
|
||||||
"name": "role",
|
|
||||||
"type": "enum('user','admin')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'user'"
|
|
||||||
},
|
|
||||||
"isActive": {
|
|
||||||
"name": "isActive",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"lastSignedIn": {
|
|
||||||
"name": "lastSignedIn",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"users_id": {
|
|
||||||
"name": "users_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"users_email_unique": {
|
|
||||||
"name": "users_email_unique",
|
|
||||||
"columns": [
|
|
||||||
"email"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"views": {},
|
|
||||||
"_meta": {
|
|
||||||
"schemas": {},
|
|
||||||
"tables": {},
|
|
||||||
"columns": {}
|
|
||||||
},
|
|
||||||
"internal": {
|
|
||||||
"tables": {},
|
|
||||||
"indexes": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,793 +0,0 @@
|
|||||||
{
|
|
||||||
"version": "5",
|
|
||||||
"dialect": "mysql",
|
|
||||||
"id": "f5aefc56-4bb4-42a1-a7f3-2b872c62eb11",
|
|
||||||
"prevId": "e34c8fec-5308-4ce7-b687-d27c3093036c",
|
|
||||||
"tables": {
|
|
||||||
"apprenants": {
|
|
||||||
"name": "apprenants",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"nom": {
|
|
||||||
"name": "nom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"prenom": {
|
|
||||||
"name": "prenom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(320)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"codeEtablissement": {
|
|
||||||
"name": "codeEtablissement",
|
|
||||||
"type": "varchar(50)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"fonction": {
|
|
||||||
"name": "fonction",
|
|
||||||
"type": "enum('directeur','chef_service','autre')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"apprenants_id": {
|
|
||||||
"name": "apprenants_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"apprenants_email_unique": {
|
|
||||||
"name": "apprenants_email_unique",
|
|
||||||
"columns": [
|
|
||||||
"email"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"datesFormation": {
|
|
||||||
"name": "datesFormation",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"sequenceId": {
|
|
||||||
"name": "sequenceId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"dateDebut": {
|
|
||||||
"name": "dateDebut",
|
|
||||||
"type": "datetime",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"dateFin": {
|
|
||||||
"name": "dateFin",
|
|
||||||
"type": "datetime",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"ordre": {
|
|
||||||
"name": "ordre",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"datesFormation_id": {
|
|
||||||
"name": "datesFormation_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"emailConfig": {
|
|
||||||
"name": "emailConfig",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"provider": {
|
|
||||||
"name": "provider",
|
|
||||||
"type": "varchar(50)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'resend'"
|
|
||||||
},
|
|
||||||
"apiKey": {
|
|
||||||
"name": "apiKey",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"fromEmail": {
|
|
||||||
"name": "fromEmail",
|
|
||||||
"type": "varchar(320)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"fromName": {
|
|
||||||
"name": "fromName",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'Formation Manager Itinova'"
|
|
||||||
},
|
|
||||||
"mode": {
|
|
||||||
"name": "mode",
|
|
||||||
"type": "enum('simulation','production')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'simulation'"
|
|
||||||
},
|
|
||||||
"domainVerified": {
|
|
||||||
"name": "domainVerified",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": false
|
|
||||||
},
|
|
||||||
"active": {
|
|
||||||
"name": "active",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"emailConfig_id": {
|
|
||||||
"name": "emailConfig_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"emailTemplates": {
|
|
||||||
"name": "emailTemplates",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"type": {
|
|
||||||
"name": "type",
|
|
||||||
"type": "varchar(50)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"logoUrl": {
|
|
||||||
"name": "logoUrl",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"primaryColor": {
|
|
||||||
"name": "primaryColor",
|
|
||||||
"type": "varchar(7)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'#2563eb'"
|
|
||||||
},
|
|
||||||
"headerBgColor": {
|
|
||||||
"name": "headerBgColor",
|
|
||||||
"type": "varchar(7)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'#2563eb'"
|
|
||||||
},
|
|
||||||
"headerTextColor": {
|
|
||||||
"name": "headerTextColor",
|
|
||||||
"type": "varchar(7)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'#ffffff'"
|
|
||||||
},
|
|
||||||
"headerTitle": {
|
|
||||||
"name": "headerTitle",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'Formation Manager Itinova'"
|
|
||||||
},
|
|
||||||
"footerText": {
|
|
||||||
"name": "footerText",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"active": {
|
|
||||||
"name": "active",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"emailTemplates_id": {
|
|
||||||
"name": "emailTemplates_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"emailTemplates_type_unique": {
|
|
||||||
"name": "emailTemplates_type_unique",
|
|
||||||
"columns": [
|
|
||||||
"type"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"formations": {
|
|
||||||
"name": "formations",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"nom": {
|
|
||||||
"name": "nom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"description": {
|
|
||||||
"name": "description",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"lienUnique": {
|
|
||||||
"name": "lienUnique",
|
|
||||||
"type": "varchar(100)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"actif": {
|
|
||||||
"name": "actif",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"formations_id": {
|
|
||||||
"name": "formations_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"formations_lienUnique_unique": {
|
|
||||||
"name": "formations_lienUnique_unique",
|
|
||||||
"columns": [
|
|
||||||
"lienUnique"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"inscriptions": {
|
|
||||||
"name": "inscriptions",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"apprenantId": {
|
|
||||||
"name": "apprenantId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"sequenceId": {
|
|
||||||
"name": "sequenceId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"statut": {
|
|
||||||
"name": "statut",
|
|
||||||
"type": "enum('confirmee','liste_attente','annulee')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"dateInscription": {
|
|
||||||
"name": "dateInscription",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"inscriptions_id": {
|
|
||||||
"name": "inscriptions_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"passwordResetTokens": {
|
|
||||||
"name": "passwordResetTokens",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"userId": {
|
|
||||||
"name": "userId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"token": {
|
|
||||||
"name": "token",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"expiresAt": {
|
|
||||||
"name": "expiresAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"used": {
|
|
||||||
"name": "used",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": false
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"passwordResetTokens_id": {
|
|
||||||
"name": "passwordResetTokens_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"passwordResetTokens_token_unique": {
|
|
||||||
"name": "passwordResetTokens_token_unique",
|
|
||||||
"columns": [
|
|
||||||
"token"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"sequences": {
|
|
||||||
"name": "sequences",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"formationId": {
|
|
||||||
"name": "formationId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"nom": {
|
|
||||||
"name": "nom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"lieu": {
|
|
||||||
"name": "lieu",
|
|
||||||
"type": "varchar(500)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"publicCible": {
|
|
||||||
"name": "publicCible",
|
|
||||||
"type": "enum('directeur','chef_service','autre')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"capaciteMax": {
|
|
||||||
"name": "capaciteMax",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": 12
|
|
||||||
},
|
|
||||||
"dateBlocage": {
|
|
||||||
"name": "dateBlocage",
|
|
||||||
"type": "datetime",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"statut": {
|
|
||||||
"name": "statut",
|
|
||||||
"type": "enum('ouverte','bloquee','terminee')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'ouverte'"
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"sequences_id": {
|
|
||||||
"name": "sequences_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"users": {
|
|
||||||
"name": "users",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"openId": {
|
|
||||||
"name": "openId",
|
|
||||||
"type": "varchar(64)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(320)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"password": {
|
|
||||||
"name": "password",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"emailVerified": {
|
|
||||||
"name": "emailVerified",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": false
|
|
||||||
},
|
|
||||||
"role": {
|
|
||||||
"name": "role",
|
|
||||||
"type": "enum('user','admin')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'user'"
|
|
||||||
},
|
|
||||||
"isActive": {
|
|
||||||
"name": "isActive",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"lastSignedIn": {
|
|
||||||
"name": "lastSignedIn",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"users_id": {
|
|
||||||
"name": "users_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"users_openId_unique": {
|
|
||||||
"name": "users_openId_unique",
|
|
||||||
"columns": [
|
|
||||||
"openId"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"users_email_unique": {
|
|
||||||
"name": "users_email_unique",
|
|
||||||
"columns": [
|
|
||||||
"email"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"views": {},
|
|
||||||
"_meta": {
|
|
||||||
"schemas": {},
|
|
||||||
"tables": {},
|
|
||||||
"columns": {}
|
|
||||||
},
|
|
||||||
"internal": {
|
|
||||||
"tables": {},
|
|
||||||
"indexes": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,780 +0,0 @@
|
|||||||
{
|
|
||||||
"version": "5",
|
|
||||||
"dialect": "mysql",
|
|
||||||
"id": "a022fe49-c9e0-4690-9e4c-954dea9e2b56",
|
|
||||||
"prevId": "f5aefc56-4bb4-42a1-a7f3-2b872c62eb11",
|
|
||||||
"tables": {
|
|
||||||
"apprenants": {
|
|
||||||
"name": "apprenants",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"nom": {
|
|
||||||
"name": "nom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"prenom": {
|
|
||||||
"name": "prenom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(320)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"codeEtablissement": {
|
|
||||||
"name": "codeEtablissement",
|
|
||||||
"type": "varchar(50)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"fonction": {
|
|
||||||
"name": "fonction",
|
|
||||||
"type": "enum('directeur','chef_service','autre')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"apprenants_id": {
|
|
||||||
"name": "apprenants_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"apprenants_email_unique": {
|
|
||||||
"name": "apprenants_email_unique",
|
|
||||||
"columns": [
|
|
||||||
"email"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"datesFormation": {
|
|
||||||
"name": "datesFormation",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"sequenceId": {
|
|
||||||
"name": "sequenceId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"dateDebut": {
|
|
||||||
"name": "dateDebut",
|
|
||||||
"type": "datetime",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"dateFin": {
|
|
||||||
"name": "dateFin",
|
|
||||||
"type": "datetime",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"ordre": {
|
|
||||||
"name": "ordre",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"datesFormation_id": {
|
|
||||||
"name": "datesFormation_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"emailConfig": {
|
|
||||||
"name": "emailConfig",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"provider": {
|
|
||||||
"name": "provider",
|
|
||||||
"type": "varchar(50)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'resend'"
|
|
||||||
},
|
|
||||||
"apiKey": {
|
|
||||||
"name": "apiKey",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"fromEmail": {
|
|
||||||
"name": "fromEmail",
|
|
||||||
"type": "varchar(320)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"fromName": {
|
|
||||||
"name": "fromName",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'Formation Manager Itinova'"
|
|
||||||
},
|
|
||||||
"mode": {
|
|
||||||
"name": "mode",
|
|
||||||
"type": "enum('simulation','production')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'simulation'"
|
|
||||||
},
|
|
||||||
"domainVerified": {
|
|
||||||
"name": "domainVerified",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": false
|
|
||||||
},
|
|
||||||
"active": {
|
|
||||||
"name": "active",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"emailConfig_id": {
|
|
||||||
"name": "emailConfig_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"emailTemplates": {
|
|
||||||
"name": "emailTemplates",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"type": {
|
|
||||||
"name": "type",
|
|
||||||
"type": "varchar(50)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"logoUrl": {
|
|
||||||
"name": "logoUrl",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"primaryColor": {
|
|
||||||
"name": "primaryColor",
|
|
||||||
"type": "varchar(7)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'#2563eb'"
|
|
||||||
},
|
|
||||||
"headerBgColor": {
|
|
||||||
"name": "headerBgColor",
|
|
||||||
"type": "varchar(7)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'#2563eb'"
|
|
||||||
},
|
|
||||||
"headerTextColor": {
|
|
||||||
"name": "headerTextColor",
|
|
||||||
"type": "varchar(7)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'#ffffff'"
|
|
||||||
},
|
|
||||||
"headerTitle": {
|
|
||||||
"name": "headerTitle",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'Formation Manager Itinova'"
|
|
||||||
},
|
|
||||||
"footerText": {
|
|
||||||
"name": "footerText",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"active": {
|
|
||||||
"name": "active",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"emailTemplates_id": {
|
|
||||||
"name": "emailTemplates_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"emailTemplates_type_unique": {
|
|
||||||
"name": "emailTemplates_type_unique",
|
|
||||||
"columns": [
|
|
||||||
"type"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"formations": {
|
|
||||||
"name": "formations",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"nom": {
|
|
||||||
"name": "nom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"description": {
|
|
||||||
"name": "description",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"lienUnique": {
|
|
||||||
"name": "lienUnique",
|
|
||||||
"type": "varchar(100)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"actif": {
|
|
||||||
"name": "actif",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"formations_id": {
|
|
||||||
"name": "formations_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"formations_lienUnique_unique": {
|
|
||||||
"name": "formations_lienUnique_unique",
|
|
||||||
"columns": [
|
|
||||||
"lienUnique"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"inscriptions": {
|
|
||||||
"name": "inscriptions",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"apprenantId": {
|
|
||||||
"name": "apprenantId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"sequenceId": {
|
|
||||||
"name": "sequenceId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"statut": {
|
|
||||||
"name": "statut",
|
|
||||||
"type": "enum('confirmee','liste_attente','annulee')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"dateInscription": {
|
|
||||||
"name": "dateInscription",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"inscriptions_id": {
|
|
||||||
"name": "inscriptions_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"passwordResetTokens": {
|
|
||||||
"name": "passwordResetTokens",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"userId": {
|
|
||||||
"name": "userId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"token": {
|
|
||||||
"name": "token",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"expiresAt": {
|
|
||||||
"name": "expiresAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"used": {
|
|
||||||
"name": "used",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": false
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"passwordResetTokens_id": {
|
|
||||||
"name": "passwordResetTokens_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"passwordResetTokens_token_unique": {
|
|
||||||
"name": "passwordResetTokens_token_unique",
|
|
||||||
"columns": [
|
|
||||||
"token"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"sequences": {
|
|
||||||
"name": "sequences",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"formationId": {
|
|
||||||
"name": "formationId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"nom": {
|
|
||||||
"name": "nom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"lieu": {
|
|
||||||
"name": "lieu",
|
|
||||||
"type": "varchar(500)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"publicCible": {
|
|
||||||
"name": "publicCible",
|
|
||||||
"type": "enum('directeur','chef_service','autre')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"capaciteMax": {
|
|
||||||
"name": "capaciteMax",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": 12
|
|
||||||
},
|
|
||||||
"dateBlocage": {
|
|
||||||
"name": "dateBlocage",
|
|
||||||
"type": "datetime",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"statut": {
|
|
||||||
"name": "statut",
|
|
||||||
"type": "enum('ouverte','bloquee','terminee')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'ouverte'"
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"sequences_id": {
|
|
||||||
"name": "sequences_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"users": {
|
|
||||||
"name": "users",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(320)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"password": {
|
|
||||||
"name": "password",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"emailVerified": {
|
|
||||||
"name": "emailVerified",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": false
|
|
||||||
},
|
|
||||||
"role": {
|
|
||||||
"name": "role",
|
|
||||||
"type": "enum('user','admin')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'user'"
|
|
||||||
},
|
|
||||||
"isActive": {
|
|
||||||
"name": "isActive",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"lastSignedIn": {
|
|
||||||
"name": "lastSignedIn",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"users_id": {
|
|
||||||
"name": "users_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"users_email_unique": {
|
|
||||||
"name": "users_email_unique",
|
|
||||||
"columns": [
|
|
||||||
"email"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"views": {},
|
|
||||||
"_meta": {
|
|
||||||
"schemas": {},
|
|
||||||
"tables": {},
|
|
||||||
"columns": {}
|
|
||||||
},
|
|
||||||
"internal": {
|
|
||||||
"tables": {},
|
|
||||||
"indexes": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,779 +0,0 @@
|
|||||||
{
|
|
||||||
"version": "5",
|
|
||||||
"dialect": "mysql",
|
|
||||||
"id": "021b7d14-5496-480a-8a5e-9fb57facc5f3",
|
|
||||||
"prevId": "a022fe49-c9e0-4690-9e4c-954dea9e2b56",
|
|
||||||
"tables": {
|
|
||||||
"apprenants": {
|
|
||||||
"name": "apprenants",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"nom": {
|
|
||||||
"name": "nom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"prenom": {
|
|
||||||
"name": "prenom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(320)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"codeEtablissement": {
|
|
||||||
"name": "codeEtablissement",
|
|
||||||
"type": "varchar(50)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"fonction": {
|
|
||||||
"name": "fonction",
|
|
||||||
"type": "enum('directeur','chef_service','autre')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"apprenants_id": {
|
|
||||||
"name": "apprenants_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"apprenants_email_unique": {
|
|
||||||
"name": "apprenants_email_unique",
|
|
||||||
"columns": [
|
|
||||||
"email"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"datesFormation": {
|
|
||||||
"name": "datesFormation",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"sequenceId": {
|
|
||||||
"name": "sequenceId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"dateDebut": {
|
|
||||||
"name": "dateDebut",
|
|
||||||
"type": "datetime",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"dateFin": {
|
|
||||||
"name": "dateFin",
|
|
||||||
"type": "datetime",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"ordre": {
|
|
||||||
"name": "ordre",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"datesFormation_id": {
|
|
||||||
"name": "datesFormation_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"emailConfig": {
|
|
||||||
"name": "emailConfig",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"provider": {
|
|
||||||
"name": "provider",
|
|
||||||
"type": "varchar(50)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'resend'"
|
|
||||||
},
|
|
||||||
"apiKey": {
|
|
||||||
"name": "apiKey",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"fromEmail": {
|
|
||||||
"name": "fromEmail",
|
|
||||||
"type": "varchar(320)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"fromName": {
|
|
||||||
"name": "fromName",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'Formation Manager Itinova'"
|
|
||||||
},
|
|
||||||
"mode": {
|
|
||||||
"name": "mode",
|
|
||||||
"type": "enum('simulation','production')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'simulation'"
|
|
||||||
},
|
|
||||||
"domainVerified": {
|
|
||||||
"name": "domainVerified",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": false
|
|
||||||
},
|
|
||||||
"active": {
|
|
||||||
"name": "active",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"emailConfig_id": {
|
|
||||||
"name": "emailConfig_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"emailTemplates": {
|
|
||||||
"name": "emailTemplates",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"type": {
|
|
||||||
"name": "type",
|
|
||||||
"type": "varchar(50)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"logoUrl": {
|
|
||||||
"name": "logoUrl",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"primaryColor": {
|
|
||||||
"name": "primaryColor",
|
|
||||||
"type": "varchar(7)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'#2563eb'"
|
|
||||||
},
|
|
||||||
"headerBgColor": {
|
|
||||||
"name": "headerBgColor",
|
|
||||||
"type": "varchar(7)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'#2563eb'"
|
|
||||||
},
|
|
||||||
"headerTextColor": {
|
|
||||||
"name": "headerTextColor",
|
|
||||||
"type": "varchar(7)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'#ffffff'"
|
|
||||||
},
|
|
||||||
"headerTitle": {
|
|
||||||
"name": "headerTitle",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'Formation Manager Itinova'"
|
|
||||||
},
|
|
||||||
"footerText": {
|
|
||||||
"name": "footerText",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"active": {
|
|
||||||
"name": "active",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"emailTemplates_id": {
|
|
||||||
"name": "emailTemplates_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"emailTemplates_type_unique": {
|
|
||||||
"name": "emailTemplates_type_unique",
|
|
||||||
"columns": [
|
|
||||||
"type"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"formations": {
|
|
||||||
"name": "formations",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"nom": {
|
|
||||||
"name": "nom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"description": {
|
|
||||||
"name": "description",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"lienUnique": {
|
|
||||||
"name": "lienUnique",
|
|
||||||
"type": "varchar(100)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"actif": {
|
|
||||||
"name": "actif",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"formations_id": {
|
|
||||||
"name": "formations_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"formations_lienUnique_unique": {
|
|
||||||
"name": "formations_lienUnique_unique",
|
|
||||||
"columns": [
|
|
||||||
"lienUnique"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"inscriptions": {
|
|
||||||
"name": "inscriptions",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"apprenantId": {
|
|
||||||
"name": "apprenantId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"sequenceId": {
|
|
||||||
"name": "sequenceId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"statut": {
|
|
||||||
"name": "statut",
|
|
||||||
"type": "enum('confirmee','liste_attente','annulee')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"dateInscription": {
|
|
||||||
"name": "dateInscription",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"inscriptions_id": {
|
|
||||||
"name": "inscriptions_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"passwordResetTokens": {
|
|
||||||
"name": "passwordResetTokens",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"userId": {
|
|
||||||
"name": "userId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"token": {
|
|
||||||
"name": "token",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"expiresAt": {
|
|
||||||
"name": "expiresAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"used": {
|
|
||||||
"name": "used",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": false
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"passwordResetTokens_id": {
|
|
||||||
"name": "passwordResetTokens_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"passwordResetTokens_token_unique": {
|
|
||||||
"name": "passwordResetTokens_token_unique",
|
|
||||||
"columns": [
|
|
||||||
"token"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"sequences": {
|
|
||||||
"name": "sequences",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"formationId": {
|
|
||||||
"name": "formationId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"nom": {
|
|
||||||
"name": "nom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"lieu": {
|
|
||||||
"name": "lieu",
|
|
||||||
"type": "varchar(500)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"publicCible": {
|
|
||||||
"name": "publicCible",
|
|
||||||
"type": "enum('directeur','chef_service','autre')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"capaciteMax": {
|
|
||||||
"name": "capaciteMax",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": 12
|
|
||||||
},
|
|
||||||
"dateBlocage": {
|
|
||||||
"name": "dateBlocage",
|
|
||||||
"type": "datetime",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"statut": {
|
|
||||||
"name": "statut",
|
|
||||||
"type": "enum('ouverte','bloquee','terminee')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'ouverte'"
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"sequences_id": {
|
|
||||||
"name": "sequences_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"users": {
|
|
||||||
"name": "users",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"openId": {
|
|
||||||
"name": "openId",
|
|
||||||
"type": "varchar(64)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(320)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"loginMethod": {
|
|
||||||
"name": "loginMethod",
|
|
||||||
"type": "varchar(64)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"role": {
|
|
||||||
"name": "role",
|
|
||||||
"type": "enum('user','admin')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'user'"
|
|
||||||
},
|
|
||||||
"isActive": {
|
|
||||||
"name": "isActive",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"lastSignedIn": {
|
|
||||||
"name": "lastSignedIn",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"users_id": {
|
|
||||||
"name": "users_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"users_openId_unique": {
|
|
||||||
"name": "users_openId_unique",
|
|
||||||
"columns": [
|
|
||||||
"openId"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"views": {},
|
|
||||||
"_meta": {
|
|
||||||
"schemas": {},
|
|
||||||
"tables": {},
|
|
||||||
"columns": {}
|
|
||||||
},
|
|
||||||
"internal": {
|
|
||||||
"tables": {},
|
|
||||||
"indexes": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,772 +0,0 @@
|
|||||||
{
|
|
||||||
"version": "5",
|
|
||||||
"dialect": "mysql",
|
|
||||||
"id": "ed024a5d-e1f8-452d-aa76-cab1195187c1",
|
|
||||||
"prevId": "021b7d14-5496-480a-8a5e-9fb57facc5f3",
|
|
||||||
"tables": {
|
|
||||||
"apprenants": {
|
|
||||||
"name": "apprenants",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"nom": {
|
|
||||||
"name": "nom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"prenom": {
|
|
||||||
"name": "prenom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(320)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"codeEtablissement": {
|
|
||||||
"name": "codeEtablissement",
|
|
||||||
"type": "varchar(50)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"fonction": {
|
|
||||||
"name": "fonction",
|
|
||||||
"type": "enum('directeur','chef_service','autre')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"apprenants_id": {
|
|
||||||
"name": "apprenants_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"apprenants_email_unique": {
|
|
||||||
"name": "apprenants_email_unique",
|
|
||||||
"columns": [
|
|
||||||
"email"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"datesFormation": {
|
|
||||||
"name": "datesFormation",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"sequenceId": {
|
|
||||||
"name": "sequenceId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"dateDebut": {
|
|
||||||
"name": "dateDebut",
|
|
||||||
"type": "datetime",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"dateFin": {
|
|
||||||
"name": "dateFin",
|
|
||||||
"type": "datetime",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"ordre": {
|
|
||||||
"name": "ordre",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"datesFormation_id": {
|
|
||||||
"name": "datesFormation_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"emailConfig": {
|
|
||||||
"name": "emailConfig",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"provider": {
|
|
||||||
"name": "provider",
|
|
||||||
"type": "varchar(50)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'resend'"
|
|
||||||
},
|
|
||||||
"apiKey": {
|
|
||||||
"name": "apiKey",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"fromEmail": {
|
|
||||||
"name": "fromEmail",
|
|
||||||
"type": "varchar(320)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"fromName": {
|
|
||||||
"name": "fromName",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'Formation Manager Itinova'"
|
|
||||||
},
|
|
||||||
"mode": {
|
|
||||||
"name": "mode",
|
|
||||||
"type": "enum('simulation','production')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'simulation'"
|
|
||||||
},
|
|
||||||
"domainVerified": {
|
|
||||||
"name": "domainVerified",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": false
|
|
||||||
},
|
|
||||||
"active": {
|
|
||||||
"name": "active",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"emailConfig_id": {
|
|
||||||
"name": "emailConfig_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"emailTemplates": {
|
|
||||||
"name": "emailTemplates",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"type": {
|
|
||||||
"name": "type",
|
|
||||||
"type": "varchar(50)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"logoUrl": {
|
|
||||||
"name": "logoUrl",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"primaryColor": {
|
|
||||||
"name": "primaryColor",
|
|
||||||
"type": "varchar(7)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'#2563eb'"
|
|
||||||
},
|
|
||||||
"headerBgColor": {
|
|
||||||
"name": "headerBgColor",
|
|
||||||
"type": "varchar(7)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'#2563eb'"
|
|
||||||
},
|
|
||||||
"headerTextColor": {
|
|
||||||
"name": "headerTextColor",
|
|
||||||
"type": "varchar(7)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'#ffffff'"
|
|
||||||
},
|
|
||||||
"headerTitle": {
|
|
||||||
"name": "headerTitle",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'Formation Manager Itinova'"
|
|
||||||
},
|
|
||||||
"footerText": {
|
|
||||||
"name": "footerText",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"active": {
|
|
||||||
"name": "active",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"emailTemplates_id": {
|
|
||||||
"name": "emailTemplates_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"emailTemplates_type_unique": {
|
|
||||||
"name": "emailTemplates_type_unique",
|
|
||||||
"columns": [
|
|
||||||
"type"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"formations": {
|
|
||||||
"name": "formations",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"nom": {
|
|
||||||
"name": "nom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"description": {
|
|
||||||
"name": "description",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"lienUnique": {
|
|
||||||
"name": "lienUnique",
|
|
||||||
"type": "varchar(100)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"actif": {
|
|
||||||
"name": "actif",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"formations_id": {
|
|
||||||
"name": "formations_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"formations_lienUnique_unique": {
|
|
||||||
"name": "formations_lienUnique_unique",
|
|
||||||
"columns": [
|
|
||||||
"lienUnique"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"inscriptions": {
|
|
||||||
"name": "inscriptions",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"apprenantId": {
|
|
||||||
"name": "apprenantId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"sequenceId": {
|
|
||||||
"name": "sequenceId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"statut": {
|
|
||||||
"name": "statut",
|
|
||||||
"type": "enum('confirmee','liste_attente','annulee')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"dateInscription": {
|
|
||||||
"name": "dateInscription",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"inscriptions_id": {
|
|
||||||
"name": "inscriptions_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"passwordResetTokens": {
|
|
||||||
"name": "passwordResetTokens",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"userId": {
|
|
||||||
"name": "userId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"token": {
|
|
||||||
"name": "token",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"expiresAt": {
|
|
||||||
"name": "expiresAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"used": {
|
|
||||||
"name": "used",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": false
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"passwordResetTokens_id": {
|
|
||||||
"name": "passwordResetTokens_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"passwordResetTokens_token_unique": {
|
|
||||||
"name": "passwordResetTokens_token_unique",
|
|
||||||
"columns": [
|
|
||||||
"token"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"sequences": {
|
|
||||||
"name": "sequences",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"formationId": {
|
|
||||||
"name": "formationId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"nom": {
|
|
||||||
"name": "nom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"lieu": {
|
|
||||||
"name": "lieu",
|
|
||||||
"type": "varchar(500)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"publicCible": {
|
|
||||||
"name": "publicCible",
|
|
||||||
"type": "enum('directeur','chef_service','autre')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"capaciteMax": {
|
|
||||||
"name": "capaciteMax",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": 12
|
|
||||||
},
|
|
||||||
"dateBlocage": {
|
|
||||||
"name": "dateBlocage",
|
|
||||||
"type": "datetime",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"statut": {
|
|
||||||
"name": "statut",
|
|
||||||
"type": "enum('ouverte','bloquee','terminee')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'ouverte'"
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"sequences_id": {
|
|
||||||
"name": "sequences_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"users": {
|
|
||||||
"name": "users",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"openId": {
|
|
||||||
"name": "openId",
|
|
||||||
"type": "varchar(64)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(320)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"loginMethod": {
|
|
||||||
"name": "loginMethod",
|
|
||||||
"type": "varchar(64)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"role": {
|
|
||||||
"name": "role",
|
|
||||||
"type": "enum('user','admin')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'user'"
|
|
||||||
},
|
|
||||||
"isActive": {
|
|
||||||
"name": "isActive",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"lastSignedIn": {
|
|
||||||
"name": "lastSignedIn",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"users_id": {
|
|
||||||
"name": "users_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"views": {},
|
|
||||||
"_meta": {
|
|
||||||
"schemas": {},
|
|
||||||
"tables": {},
|
|
||||||
"columns": {}
|
|
||||||
},
|
|
||||||
"internal": {
|
|
||||||
"tables": {},
|
|
||||||
"indexes": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,772 +0,0 @@
|
|||||||
{
|
|
||||||
"version": "5",
|
|
||||||
"dialect": "mysql",
|
|
||||||
"id": "227aca0a-a830-4a26-9bd7-edca209e040b",
|
|
||||||
"prevId": "ed024a5d-e1f8-452d-aa76-cab1195187c1",
|
|
||||||
"tables": {
|
|
||||||
"apprenants": {
|
|
||||||
"name": "apprenants",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"nom": {
|
|
||||||
"name": "nom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"prenom": {
|
|
||||||
"name": "prenom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(320)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"codeEtablissement": {
|
|
||||||
"name": "codeEtablissement",
|
|
||||||
"type": "varchar(50)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"fonction": {
|
|
||||||
"name": "fonction",
|
|
||||||
"type": "enum('directeur','chef_service','autre')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"apprenants_id": {
|
|
||||||
"name": "apprenants_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"apprenants_email_unique": {
|
|
||||||
"name": "apprenants_email_unique",
|
|
||||||
"columns": [
|
|
||||||
"email"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"datesFormation": {
|
|
||||||
"name": "datesFormation",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"sequenceId": {
|
|
||||||
"name": "sequenceId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"dateDebut": {
|
|
||||||
"name": "dateDebut",
|
|
||||||
"type": "datetime",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"dateFin": {
|
|
||||||
"name": "dateFin",
|
|
||||||
"type": "datetime",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"ordre": {
|
|
||||||
"name": "ordre",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"datesFormation_id": {
|
|
||||||
"name": "datesFormation_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"emailConfig": {
|
|
||||||
"name": "emailConfig",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"provider": {
|
|
||||||
"name": "provider",
|
|
||||||
"type": "varchar(50)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'resend'"
|
|
||||||
},
|
|
||||||
"apiKey": {
|
|
||||||
"name": "apiKey",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"fromEmail": {
|
|
||||||
"name": "fromEmail",
|
|
||||||
"type": "varchar(320)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"fromName": {
|
|
||||||
"name": "fromName",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'Formation Manager Itinova'"
|
|
||||||
},
|
|
||||||
"mode": {
|
|
||||||
"name": "mode",
|
|
||||||
"type": "enum('simulation','production')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'simulation'"
|
|
||||||
},
|
|
||||||
"domainVerified": {
|
|
||||||
"name": "domainVerified",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": false
|
|
||||||
},
|
|
||||||
"active": {
|
|
||||||
"name": "active",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"emailConfig_id": {
|
|
||||||
"name": "emailConfig_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"emailTemplates": {
|
|
||||||
"name": "emailTemplates",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"type": {
|
|
||||||
"name": "type",
|
|
||||||
"type": "varchar(50)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"logoUrl": {
|
|
||||||
"name": "logoUrl",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"primaryColor": {
|
|
||||||
"name": "primaryColor",
|
|
||||||
"type": "varchar(7)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'#2563eb'"
|
|
||||||
},
|
|
||||||
"headerBgColor": {
|
|
||||||
"name": "headerBgColor",
|
|
||||||
"type": "varchar(7)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'#2563eb'"
|
|
||||||
},
|
|
||||||
"headerTextColor": {
|
|
||||||
"name": "headerTextColor",
|
|
||||||
"type": "varchar(7)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'#ffffff'"
|
|
||||||
},
|
|
||||||
"headerTitle": {
|
|
||||||
"name": "headerTitle",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'Formation Manager Itinova'"
|
|
||||||
},
|
|
||||||
"footerText": {
|
|
||||||
"name": "footerText",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"active": {
|
|
||||||
"name": "active",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"emailTemplates_id": {
|
|
||||||
"name": "emailTemplates_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"emailTemplates_type_unique": {
|
|
||||||
"name": "emailTemplates_type_unique",
|
|
||||||
"columns": [
|
|
||||||
"type"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"formations": {
|
|
||||||
"name": "formations",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"nom": {
|
|
||||||
"name": "nom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"description": {
|
|
||||||
"name": "description",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"lienUnique": {
|
|
||||||
"name": "lienUnique",
|
|
||||||
"type": "varchar(100)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"actif": {
|
|
||||||
"name": "actif",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"formations_id": {
|
|
||||||
"name": "formations_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"formations_lienUnique_unique": {
|
|
||||||
"name": "formations_lienUnique_unique",
|
|
||||||
"columns": [
|
|
||||||
"lienUnique"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"inscriptions": {
|
|
||||||
"name": "inscriptions",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"apprenantId": {
|
|
||||||
"name": "apprenantId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"sequenceId": {
|
|
||||||
"name": "sequenceId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"statut": {
|
|
||||||
"name": "statut",
|
|
||||||
"type": "enum('confirmee','liste_attente','annulee')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"dateInscription": {
|
|
||||||
"name": "dateInscription",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"inscriptions_id": {
|
|
||||||
"name": "inscriptions_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"passwordResetTokens": {
|
|
||||||
"name": "passwordResetTokens",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"userId": {
|
|
||||||
"name": "userId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"token": {
|
|
||||||
"name": "token",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"expiresAt": {
|
|
||||||
"name": "expiresAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"used": {
|
|
||||||
"name": "used",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": false
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"passwordResetTokens_id": {
|
|
||||||
"name": "passwordResetTokens_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"passwordResetTokens_token_unique": {
|
|
||||||
"name": "passwordResetTokens_token_unique",
|
|
||||||
"columns": [
|
|
||||||
"token"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"sequences": {
|
|
||||||
"name": "sequences",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"formationId": {
|
|
||||||
"name": "formationId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"nom": {
|
|
||||||
"name": "nom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"lieu": {
|
|
||||||
"name": "lieu",
|
|
||||||
"type": "varchar(500)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"publicCible": {
|
|
||||||
"name": "publicCible",
|
|
||||||
"type": "enum('directeur','chef_service','tous','autre')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"capaciteMax": {
|
|
||||||
"name": "capaciteMax",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": 12
|
|
||||||
},
|
|
||||||
"dateBlocage": {
|
|
||||||
"name": "dateBlocage",
|
|
||||||
"type": "datetime",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"statut": {
|
|
||||||
"name": "statut",
|
|
||||||
"type": "enum('ouverte','bloquee','terminee')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'ouverte'"
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"sequences_id": {
|
|
||||||
"name": "sequences_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"users": {
|
|
||||||
"name": "users",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"openId": {
|
|
||||||
"name": "openId",
|
|
||||||
"type": "varchar(64)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(320)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"loginMethod": {
|
|
||||||
"name": "loginMethod",
|
|
||||||
"type": "varchar(64)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"role": {
|
|
||||||
"name": "role",
|
|
||||||
"type": "enum('user','admin')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'user'"
|
|
||||||
},
|
|
||||||
"isActive": {
|
|
||||||
"name": "isActive",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"lastSignedIn": {
|
|
||||||
"name": "lastSignedIn",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"users_id": {
|
|
||||||
"name": "users_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"views": {},
|
|
||||||
"_meta": {
|
|
||||||
"schemas": {},
|
|
||||||
"tables": {},
|
|
||||||
"columns": {}
|
|
||||||
},
|
|
||||||
"internal": {
|
|
||||||
"tables": {},
|
|
||||||
"indexes": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,779 +0,0 @@
|
|||||||
{
|
|
||||||
"version": "5",
|
|
||||||
"dialect": "mysql",
|
|
||||||
"id": "860496d9-3739-4694-b45d-725a447f3eee",
|
|
||||||
"prevId": "227aca0a-a830-4a26-9bd7-edca209e040b",
|
|
||||||
"tables": {
|
|
||||||
"apprenants": {
|
|
||||||
"name": "apprenants",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"nom": {
|
|
||||||
"name": "nom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"prenom": {
|
|
||||||
"name": "prenom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(320)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"codeEtablissement": {
|
|
||||||
"name": "codeEtablissement",
|
|
||||||
"type": "varchar(50)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"fonction": {
|
|
||||||
"name": "fonction",
|
|
||||||
"type": "enum('directeur','chef_service','autre')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"apprenants_id": {
|
|
||||||
"name": "apprenants_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"apprenants_email_unique": {
|
|
||||||
"name": "apprenants_email_unique",
|
|
||||||
"columns": [
|
|
||||||
"email"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"datesFormation": {
|
|
||||||
"name": "datesFormation",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"sequenceId": {
|
|
||||||
"name": "sequenceId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"dateDebut": {
|
|
||||||
"name": "dateDebut",
|
|
||||||
"type": "datetime",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"dateFin": {
|
|
||||||
"name": "dateFin",
|
|
||||||
"type": "datetime",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"ordre": {
|
|
||||||
"name": "ordre",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"datesFormation_id": {
|
|
||||||
"name": "datesFormation_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"emailConfig": {
|
|
||||||
"name": "emailConfig",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"provider": {
|
|
||||||
"name": "provider",
|
|
||||||
"type": "varchar(50)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'resend'"
|
|
||||||
},
|
|
||||||
"apiKey": {
|
|
||||||
"name": "apiKey",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"fromEmail": {
|
|
||||||
"name": "fromEmail",
|
|
||||||
"type": "varchar(320)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"fromName": {
|
|
||||||
"name": "fromName",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'Formation Manager Itinova'"
|
|
||||||
},
|
|
||||||
"mode": {
|
|
||||||
"name": "mode",
|
|
||||||
"type": "enum('simulation','production')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'simulation'"
|
|
||||||
},
|
|
||||||
"domainVerified": {
|
|
||||||
"name": "domainVerified",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": false
|
|
||||||
},
|
|
||||||
"active": {
|
|
||||||
"name": "active",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"emailConfig_id": {
|
|
||||||
"name": "emailConfig_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"emailTemplates": {
|
|
||||||
"name": "emailTemplates",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"type": {
|
|
||||||
"name": "type",
|
|
||||||
"type": "varchar(50)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"logoUrl": {
|
|
||||||
"name": "logoUrl",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"primaryColor": {
|
|
||||||
"name": "primaryColor",
|
|
||||||
"type": "varchar(7)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'#2563eb'"
|
|
||||||
},
|
|
||||||
"headerBgColor": {
|
|
||||||
"name": "headerBgColor",
|
|
||||||
"type": "varchar(7)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'#2563eb'"
|
|
||||||
},
|
|
||||||
"headerTextColor": {
|
|
||||||
"name": "headerTextColor",
|
|
||||||
"type": "varchar(7)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'#ffffff'"
|
|
||||||
},
|
|
||||||
"headerTitle": {
|
|
||||||
"name": "headerTitle",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'Formation Manager Itinova'"
|
|
||||||
},
|
|
||||||
"footerText": {
|
|
||||||
"name": "footerText",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"active": {
|
|
||||||
"name": "active",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"emailTemplates_id": {
|
|
||||||
"name": "emailTemplates_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"emailTemplates_type_unique": {
|
|
||||||
"name": "emailTemplates_type_unique",
|
|
||||||
"columns": [
|
|
||||||
"type"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"formations": {
|
|
||||||
"name": "formations",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"nom": {
|
|
||||||
"name": "nom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"description": {
|
|
||||||
"name": "description",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"lienUnique": {
|
|
||||||
"name": "lienUnique",
|
|
||||||
"type": "varchar(100)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"actif": {
|
|
||||||
"name": "actif",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"formations_id": {
|
|
||||||
"name": "formations_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"formations_lienUnique_unique": {
|
|
||||||
"name": "formations_lienUnique_unique",
|
|
||||||
"columns": [
|
|
||||||
"lienUnique"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"inscriptions": {
|
|
||||||
"name": "inscriptions",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"apprenantId": {
|
|
||||||
"name": "apprenantId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"sequenceId": {
|
|
||||||
"name": "sequenceId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"statut": {
|
|
||||||
"name": "statut",
|
|
||||||
"type": "enum('confirmee','liste_attente','annulee')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"dateInscription": {
|
|
||||||
"name": "dateInscription",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"inscriptions_id": {
|
|
||||||
"name": "inscriptions_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"passwordResetTokens": {
|
|
||||||
"name": "passwordResetTokens",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"userId": {
|
|
||||||
"name": "userId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"token": {
|
|
||||||
"name": "token",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"expiresAt": {
|
|
||||||
"name": "expiresAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"used": {
|
|
||||||
"name": "used",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": false
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"passwordResetTokens_id": {
|
|
||||||
"name": "passwordResetTokens_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"passwordResetTokens_token_unique": {
|
|
||||||
"name": "passwordResetTokens_token_unique",
|
|
||||||
"columns": [
|
|
||||||
"token"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"sequences": {
|
|
||||||
"name": "sequences",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"formationId": {
|
|
||||||
"name": "formationId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"nom": {
|
|
||||||
"name": "nom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"lieu": {
|
|
||||||
"name": "lieu",
|
|
||||||
"type": "varchar(500)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"publicCible": {
|
|
||||||
"name": "publicCible",
|
|
||||||
"type": "enum('directeur','chef_service','tous','autre')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"formateur": {
|
|
||||||
"name": "formateur",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"capaciteMax": {
|
|
||||||
"name": "capaciteMax",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": 12
|
|
||||||
},
|
|
||||||
"dateBlocage": {
|
|
||||||
"name": "dateBlocage",
|
|
||||||
"type": "datetime",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"statut": {
|
|
||||||
"name": "statut",
|
|
||||||
"type": "enum('ouverte','bloquee','terminee')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'ouverte'"
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"sequences_id": {
|
|
||||||
"name": "sequences_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"users": {
|
|
||||||
"name": "users",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"openId": {
|
|
||||||
"name": "openId",
|
|
||||||
"type": "varchar(64)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(320)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"loginMethod": {
|
|
||||||
"name": "loginMethod",
|
|
||||||
"type": "varchar(64)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"role": {
|
|
||||||
"name": "role",
|
|
||||||
"type": "enum('user','admin')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'user'"
|
|
||||||
},
|
|
||||||
"isActive": {
|
|
||||||
"name": "isActive",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"lastSignedIn": {
|
|
||||||
"name": "lastSignedIn",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"users_id": {
|
|
||||||
"name": "users_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"views": {},
|
|
||||||
"_meta": {
|
|
||||||
"schemas": {},
|
|
||||||
"tables": {},
|
|
||||||
"columns": {}
|
|
||||||
},
|
|
||||||
"internal": {
|
|
||||||
"tables": {},
|
|
||||||
"indexes": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,842 +0,0 @@
|
|||||||
{
|
|
||||||
"version": "5",
|
|
||||||
"dialect": "mysql",
|
|
||||||
"id": "d7d07602-ed71-4c09-b5d4-3ebd05e45303",
|
|
||||||
"prevId": "860496d9-3739-4694-b45d-725a447f3eee",
|
|
||||||
"tables": {
|
|
||||||
"apprenants": {
|
|
||||||
"name": "apprenants",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"nom": {
|
|
||||||
"name": "nom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"prenom": {
|
|
||||||
"name": "prenom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(320)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"codeEtablissement": {
|
|
||||||
"name": "codeEtablissement",
|
|
||||||
"type": "varchar(50)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"fonction": {
|
|
||||||
"name": "fonction",
|
|
||||||
"type": "enum('directeur','chef_service','autre')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"apprenants_id": {
|
|
||||||
"name": "apprenants_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"apprenants_email_unique": {
|
|
||||||
"name": "apprenants_email_unique",
|
|
||||||
"columns": [
|
|
||||||
"email"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"datesFormation": {
|
|
||||||
"name": "datesFormation",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"sequenceId": {
|
|
||||||
"name": "sequenceId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"dateDebut": {
|
|
||||||
"name": "dateDebut",
|
|
||||||
"type": "datetime",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"dateFin": {
|
|
||||||
"name": "dateFin",
|
|
||||||
"type": "datetime",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"ordre": {
|
|
||||||
"name": "ordre",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"datesFormation_id": {
|
|
||||||
"name": "datesFormation_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"emailConfig": {
|
|
||||||
"name": "emailConfig",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"provider": {
|
|
||||||
"name": "provider",
|
|
||||||
"type": "varchar(50)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'resend'"
|
|
||||||
},
|
|
||||||
"apiKey": {
|
|
||||||
"name": "apiKey",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"fromEmail": {
|
|
||||||
"name": "fromEmail",
|
|
||||||
"type": "varchar(320)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"fromName": {
|
|
||||||
"name": "fromName",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'Formation Manager Itinova'"
|
|
||||||
},
|
|
||||||
"mode": {
|
|
||||||
"name": "mode",
|
|
||||||
"type": "enum('simulation','production')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'simulation'"
|
|
||||||
},
|
|
||||||
"domainVerified": {
|
|
||||||
"name": "domainVerified",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": false
|
|
||||||
},
|
|
||||||
"active": {
|
|
||||||
"name": "active",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"emailConfig_id": {
|
|
||||||
"name": "emailConfig_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"emailTemplates": {
|
|
||||||
"name": "emailTemplates",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"type": {
|
|
||||||
"name": "type",
|
|
||||||
"type": "varchar(50)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"logoUrl": {
|
|
||||||
"name": "logoUrl",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"primaryColor": {
|
|
||||||
"name": "primaryColor",
|
|
||||||
"type": "varchar(7)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'#2563eb'"
|
|
||||||
},
|
|
||||||
"headerBgColor": {
|
|
||||||
"name": "headerBgColor",
|
|
||||||
"type": "varchar(7)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'#2563eb'"
|
|
||||||
},
|
|
||||||
"headerTextColor": {
|
|
||||||
"name": "headerTextColor",
|
|
||||||
"type": "varchar(7)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'#ffffff'"
|
|
||||||
},
|
|
||||||
"headerTitle": {
|
|
||||||
"name": "headerTitle",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'Formation Manager Itinova'"
|
|
||||||
},
|
|
||||||
"footerText": {
|
|
||||||
"name": "footerText",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"active": {
|
|
||||||
"name": "active",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"emailTemplates_id": {
|
|
||||||
"name": "emailTemplates_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"emailTemplates_type_unique": {
|
|
||||||
"name": "emailTemplates_type_unique",
|
|
||||||
"columns": [
|
|
||||||
"type"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"formateurs": {
|
|
||||||
"name": "formateurs",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"nom": {
|
|
||||||
"name": "nom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"actif": {
|
|
||||||
"name": "actif",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"formateurs_id": {
|
|
||||||
"name": "formateurs_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"formateurs_nom_unique": {
|
|
||||||
"name": "formateurs_nom_unique",
|
|
||||||
"columns": [
|
|
||||||
"nom"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"formations": {
|
|
||||||
"name": "formations",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"nom": {
|
|
||||||
"name": "nom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"description": {
|
|
||||||
"name": "description",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"lienUnique": {
|
|
||||||
"name": "lienUnique",
|
|
||||||
"type": "varchar(100)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"actif": {
|
|
||||||
"name": "actif",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"formations_id": {
|
|
||||||
"name": "formations_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"formations_lienUnique_unique": {
|
|
||||||
"name": "formations_lienUnique_unique",
|
|
||||||
"columns": [
|
|
||||||
"lienUnique"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"inscriptions": {
|
|
||||||
"name": "inscriptions",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"apprenantId": {
|
|
||||||
"name": "apprenantId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"sequenceId": {
|
|
||||||
"name": "sequenceId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"statut": {
|
|
||||||
"name": "statut",
|
|
||||||
"type": "enum('confirmee','liste_attente','annulee')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"dateInscription": {
|
|
||||||
"name": "dateInscription",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"inscriptions_id": {
|
|
||||||
"name": "inscriptions_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"passwordResetTokens": {
|
|
||||||
"name": "passwordResetTokens",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"userId": {
|
|
||||||
"name": "userId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"token": {
|
|
||||||
"name": "token",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"expiresAt": {
|
|
||||||
"name": "expiresAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"used": {
|
|
||||||
"name": "used",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": false
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"passwordResetTokens_id": {
|
|
||||||
"name": "passwordResetTokens_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"passwordResetTokens_token_unique": {
|
|
||||||
"name": "passwordResetTokens_token_unique",
|
|
||||||
"columns": [
|
|
||||||
"token"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"sequences": {
|
|
||||||
"name": "sequences",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"formationId": {
|
|
||||||
"name": "formationId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"nom": {
|
|
||||||
"name": "nom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"lieu": {
|
|
||||||
"name": "lieu",
|
|
||||||
"type": "varchar(500)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"publicCible": {
|
|
||||||
"name": "publicCible",
|
|
||||||
"type": "enum('directeur','chef_service','tous','autre')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"formateur": {
|
|
||||||
"name": "formateur",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"capaciteMax": {
|
|
||||||
"name": "capaciteMax",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": 12
|
|
||||||
},
|
|
||||||
"dateBlocage": {
|
|
||||||
"name": "dateBlocage",
|
|
||||||
"type": "datetime",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"statut": {
|
|
||||||
"name": "statut",
|
|
||||||
"type": "enum('ouverte','bloquee','terminee')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'ouverte'"
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"sequences_id": {
|
|
||||||
"name": "sequences_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"users": {
|
|
||||||
"name": "users",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"openId": {
|
|
||||||
"name": "openId",
|
|
||||||
"type": "varchar(64)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(320)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"loginMethod": {
|
|
||||||
"name": "loginMethod",
|
|
||||||
"type": "varchar(64)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"role": {
|
|
||||||
"name": "role",
|
|
||||||
"type": "enum('user','admin')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'user'"
|
|
||||||
},
|
|
||||||
"isActive": {
|
|
||||||
"name": "isActive",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"lastSignedIn": {
|
|
||||||
"name": "lastSignedIn",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"users_id": {
|
|
||||||
"name": "users_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"views": {},
|
|
||||||
"_meta": {
|
|
||||||
"schemas": {},
|
|
||||||
"tables": {},
|
|
||||||
"columns": {}
|
|
||||||
},
|
|
||||||
"internal": {
|
|
||||||
"tables": {},
|
|
||||||
"indexes": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,958 +0,0 @@
|
|||||||
{
|
|
||||||
"version": "5",
|
|
||||||
"dialect": "mysql",
|
|
||||||
"id": "634fe51e-8827-4f0f-b033-dcd01c3acb21",
|
|
||||||
"prevId": "d7d07602-ed71-4c09-b5d4-3ebd05e45303",
|
|
||||||
"tables": {
|
|
||||||
"apprenants": {
|
|
||||||
"name": "apprenants",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"nom": {
|
|
||||||
"name": "nom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"prenom": {
|
|
||||||
"name": "prenom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(320)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"codeEtablissement": {
|
|
||||||
"name": "codeEtablissement",
|
|
||||||
"type": "varchar(50)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"fonction": {
|
|
||||||
"name": "fonction",
|
|
||||||
"type": "enum('directeur','chef_service','autre')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"apprenants_id": {
|
|
||||||
"name": "apprenants_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"apprenants_email_unique": {
|
|
||||||
"name": "apprenants_email_unique",
|
|
||||||
"columns": [
|
|
||||||
"email"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"datesFormation": {
|
|
||||||
"name": "datesFormation",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"sequenceId": {
|
|
||||||
"name": "sequenceId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"dateDebut": {
|
|
||||||
"name": "dateDebut",
|
|
||||||
"type": "datetime",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"dateFin": {
|
|
||||||
"name": "dateFin",
|
|
||||||
"type": "datetime",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"ordre": {
|
|
||||||
"name": "ordre",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"datesFormation_id": {
|
|
||||||
"name": "datesFormation_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"emailConfig": {
|
|
||||||
"name": "emailConfig",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"provider": {
|
|
||||||
"name": "provider",
|
|
||||||
"type": "varchar(50)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'resend'"
|
|
||||||
},
|
|
||||||
"apiKey": {
|
|
||||||
"name": "apiKey",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"fromEmail": {
|
|
||||||
"name": "fromEmail",
|
|
||||||
"type": "varchar(320)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"fromName": {
|
|
||||||
"name": "fromName",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'Formation Manager Itinova'"
|
|
||||||
},
|
|
||||||
"mode": {
|
|
||||||
"name": "mode",
|
|
||||||
"type": "enum('simulation','production')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'simulation'"
|
|
||||||
},
|
|
||||||
"domainVerified": {
|
|
||||||
"name": "domainVerified",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": false
|
|
||||||
},
|
|
||||||
"active": {
|
|
||||||
"name": "active",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"emailConfig_id": {
|
|
||||||
"name": "emailConfig_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"emailTemplates": {
|
|
||||||
"name": "emailTemplates",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"type": {
|
|
||||||
"name": "type",
|
|
||||||
"type": "varchar(50)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"logoUrl": {
|
|
||||||
"name": "logoUrl",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"primaryColor": {
|
|
||||||
"name": "primaryColor",
|
|
||||||
"type": "varchar(7)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'#2563eb'"
|
|
||||||
},
|
|
||||||
"headerBgColor": {
|
|
||||||
"name": "headerBgColor",
|
|
||||||
"type": "varchar(7)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'#2563eb'"
|
|
||||||
},
|
|
||||||
"headerTextColor": {
|
|
||||||
"name": "headerTextColor",
|
|
||||||
"type": "varchar(7)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'#ffffff'"
|
|
||||||
},
|
|
||||||
"headerTitle": {
|
|
||||||
"name": "headerTitle",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'Formation Manager Itinova'"
|
|
||||||
},
|
|
||||||
"footerText": {
|
|
||||||
"name": "footerText",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"active": {
|
|
||||||
"name": "active",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"emailTemplates_id": {
|
|
||||||
"name": "emailTemplates_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"emailTemplates_type_unique": {
|
|
||||||
"name": "emailTemplates_type_unique",
|
|
||||||
"columns": [
|
|
||||||
"type"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"formateurs": {
|
|
||||||
"name": "formateurs",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"nom": {
|
|
||||||
"name": "nom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"actif": {
|
|
||||||
"name": "actif",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"formateurs_id": {
|
|
||||||
"name": "formateurs_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"formateurs_nom_unique": {
|
|
||||||
"name": "formateurs_nom_unique",
|
|
||||||
"columns": [
|
|
||||||
"nom"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"formations": {
|
|
||||||
"name": "formations",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"nom": {
|
|
||||||
"name": "nom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"description": {
|
|
||||||
"name": "description",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"lienUnique": {
|
|
||||||
"name": "lienUnique",
|
|
||||||
"type": "varchar(100)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"actif": {
|
|
||||||
"name": "actif",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"formations_id": {
|
|
||||||
"name": "formations_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"formations_lienUnique_unique": {
|
|
||||||
"name": "formations_lienUnique_unique",
|
|
||||||
"columns": [
|
|
||||||
"lienUnique"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"inscriptions": {
|
|
||||||
"name": "inscriptions",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"apprenantId": {
|
|
||||||
"name": "apprenantId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"sequenceId": {
|
|
||||||
"name": "sequenceId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"statut": {
|
|
||||||
"name": "statut",
|
|
||||||
"type": "enum('confirmee','liste_attente','annulee')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"dateInscription": {
|
|
||||||
"name": "dateInscription",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"inscriptions_id": {
|
|
||||||
"name": "inscriptions_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"passwordResetTokens": {
|
|
||||||
"name": "passwordResetTokens",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"userId": {
|
|
||||||
"name": "userId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"token": {
|
|
||||||
"name": "token",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"expiresAt": {
|
|
||||||
"name": "expiresAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"used": {
|
|
||||||
"name": "used",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": false
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"passwordResetTokens_id": {
|
|
||||||
"name": "passwordResetTokens_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {
|
|
||||||
"passwordResetTokens_token_unique": {
|
|
||||||
"name": "passwordResetTokens_token_unique",
|
|
||||||
"columns": [
|
|
||||||
"token"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"rappels": {
|
|
||||||
"name": "rappels",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"nom": {
|
|
||||||
"name": "nom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"joursAvant": {
|
|
||||||
"name": "joursAvant",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"emailTemplate": {
|
|
||||||
"name": "emailTemplate",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"actif": {
|
|
||||||
"name": "actif",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"rappels_id": {
|
|
||||||
"name": "rappels_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"rappelsEnvoyes": {
|
|
||||||
"name": "rappelsEnvoyes",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"rappelId": {
|
|
||||||
"name": "rappelId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"inscriptionId": {
|
|
||||||
"name": "inscriptionId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"dateEnvoi": {
|
|
||||||
"name": "dateEnvoi",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"rappelsEnvoyes_id": {
|
|
||||||
"name": "rappelsEnvoyes_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"sequences": {
|
|
||||||
"name": "sequences",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"formationId": {
|
|
||||||
"name": "formationId",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"nom": {
|
|
||||||
"name": "nom",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"lieu": {
|
|
||||||
"name": "lieu",
|
|
||||||
"type": "varchar(500)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"publicCible": {
|
|
||||||
"name": "publicCible",
|
|
||||||
"type": "enum('directeur','chef_service','tous','autre')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"formateur": {
|
|
||||||
"name": "formateur",
|
|
||||||
"type": "varchar(255)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"capaciteMax": {
|
|
||||||
"name": "capaciteMax",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": 12
|
|
||||||
},
|
|
||||||
"dateBlocage": {
|
|
||||||
"name": "dateBlocage",
|
|
||||||
"type": "datetime",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"statut": {
|
|
||||||
"name": "statut",
|
|
||||||
"type": "enum('ouverte','bloquee','terminee')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'ouverte'"
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"sequences_id": {
|
|
||||||
"name": "sequences_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
},
|
|
||||||
"users": {
|
|
||||||
"name": "users",
|
|
||||||
"columns": {
|
|
||||||
"id": {
|
|
||||||
"name": "id",
|
|
||||||
"type": "int",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": true
|
|
||||||
},
|
|
||||||
"openId": {
|
|
||||||
"name": "openId",
|
|
||||||
"type": "varchar(64)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"name": "name",
|
|
||||||
"type": "text",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"name": "email",
|
|
||||||
"type": "varchar(320)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"loginMethod": {
|
|
||||||
"name": "loginMethod",
|
|
||||||
"type": "varchar(64)",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": false,
|
|
||||||
"autoincrement": false
|
|
||||||
},
|
|
||||||
"role": {
|
|
||||||
"name": "role",
|
|
||||||
"type": "enum('user','admin')",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "'user'"
|
|
||||||
},
|
|
||||||
"isActive": {
|
|
||||||
"name": "isActive",
|
|
||||||
"type": "boolean",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
"createdAt": {
|
|
||||||
"name": "createdAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"updatedAt": {
|
|
||||||
"name": "updatedAt",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"onUpdate": true,
|
|
||||||
"default": "(now())"
|
|
||||||
},
|
|
||||||
"lastSignedIn": {
|
|
||||||
"name": "lastSignedIn",
|
|
||||||
"type": "timestamp",
|
|
||||||
"primaryKey": false,
|
|
||||||
"notNull": true,
|
|
||||||
"autoincrement": false,
|
|
||||||
"default": "(now())"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"indexes": {},
|
|
||||||
"foreignKeys": {},
|
|
||||||
"compositePrimaryKeys": {
|
|
||||||
"users_id": {
|
|
||||||
"name": "users_id",
|
|
||||||
"columns": [
|
|
||||||
"id"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uniqueConstraints": {},
|
|
||||||
"checkConstraint": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"views": {},
|
|
||||||
"_meta": {
|
|
||||||
"schemas": {},
|
|
||||||
"tables": {},
|
|
||||||
"columns": {}
|
|
||||||
},
|
|
||||||
"internal": {
|
|
||||||
"tables": {},
|
|
||||||
"indexes": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -71,69 +71,6 @@
|
|||||||
"when": 1763448844826,
|
"when": 1763448844826,
|
||||||
"tag": "0009_polite_senator_kelly",
|
"tag": "0009_polite_senator_kelly",
|
||||||
"breakpoints": true
|
"breakpoints": true
|
||||||
},
|
|
||||||
{
|
|
||||||
"idx": 10,
|
|
||||||
"version": "5",
|
|
||||||
"when": 1763544545719,
|
|
||||||
"tag": "0010_flat_clint_barton",
|
|
||||||
"breakpoints": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"idx": 11,
|
|
||||||
"version": "5",
|
|
||||||
"when": 1763553528196,
|
|
||||||
"tag": "0011_talented_toad_men",
|
|
||||||
"breakpoints": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"idx": 12,
|
|
||||||
"version": "5",
|
|
||||||
"when": 1763559297757,
|
|
||||||
"tag": "0012_perfect_night_thrasher",
|
|
||||||
"breakpoints": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"idx": 13,
|
|
||||||
"version": "5",
|
|
||||||
"when": 1763560331864,
|
|
||||||
"tag": "0013_bitter_switch",
|
|
||||||
"breakpoints": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"idx": 14,
|
|
||||||
"version": "5",
|
|
||||||
"when": 1763560452219,
|
|
||||||
"tag": "0014_silky_mac_gargan",
|
|
||||||
"breakpoints": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"idx": 15,
|
|
||||||
"version": "5",
|
|
||||||
"when": 1763561100930,
|
|
||||||
"tag": "0015_brainy_terrax",
|
|
||||||
"breakpoints": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"idx": 16,
|
|
||||||
"version": "5",
|
|
||||||
"when": 1763562352026,
|
|
||||||
"tag": "0016_chunky_landau",
|
|
||||||
"breakpoints": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"idx": 17,
|
|
||||||
"version": "5",
|
|
||||||
"when": 1763563084443,
|
|
||||||
"tag": "0017_dear_tana_nile",
|
|
||||||
"breakpoints": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"idx": 18,
|
|
||||||
"version": "5",
|
|
||||||
"when": 1763564375261,
|
|
||||||
"tag": "0018_breezy_thundra",
|
|
||||||
"breakpoints": true
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -12,7 +12,7 @@ export const users = mysqlTable("users", {
|
|||||||
*/
|
*/
|
||||||
id: int("id").autoincrement().primaryKey(),
|
id: int("id").autoincrement().primaryKey(),
|
||||||
/** Manus OAuth identifier (openId) returned from the OAuth callback. Unique per user. */
|
/** Manus OAuth identifier (openId) returned from the OAuth callback. Unique per user. */
|
||||||
openId: varchar("openId", { length: 64 }),
|
openId: varchar("openId", { length: 64 }).notNull().unique(),
|
||||||
name: text("name"),
|
name: text("name"),
|
||||||
email: varchar("email", { length: 320 }),
|
email: varchar("email", { length: 320 }),
|
||||||
loginMethod: varchar("loginMethod", { length: 64 }),
|
loginMethod: varchar("loginMethod", { length: 64 }),
|
||||||
@@ -61,20 +61,6 @@ export const apprenants = mysqlTable("apprenants", {
|
|||||||
export type Apprenant = typeof apprenants.$inferSelect;
|
export type Apprenant = typeof apprenants.$inferSelect;
|
||||||
export type InsertApprenant = typeof apprenants.$inferInsert;
|
export type InsertApprenant = typeof apprenants.$inferInsert;
|
||||||
|
|
||||||
/**
|
|
||||||
* Table des formateurs
|
|
||||||
*/
|
|
||||||
export const formateurs = mysqlTable("formateurs", {
|
|
||||||
id: int("id").autoincrement().primaryKey(),
|
|
||||||
nom: varchar("nom", { length: 255 }).notNull().unique(),
|
|
||||||
actif: boolean("actif").default(true).notNull(),
|
|
||||||
createdAt: timestamp("createdAt").defaultNow().notNull(),
|
|
||||||
updatedAt: timestamp("updatedAt").defaultNow().onUpdateNow().notNull(),
|
|
||||||
});
|
|
||||||
|
|
||||||
export type Formateur = typeof formateurs.$inferSelect;
|
|
||||||
export type InsertFormateur = typeof formateurs.$inferInsert;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Table des séquences de formation
|
* Table des séquences de formation
|
||||||
* Une séquence peut contenir jusqu'à 4 dates de formation
|
* Une séquence peut contenir jusqu'à 4 dates de formation
|
||||||
@@ -85,10 +71,8 @@ export const sequences = mysqlTable("sequences", {
|
|||||||
nom: varchar("nom", { length: 255 }).notNull(),
|
nom: varchar("nom", { length: 255 }).notNull(),
|
||||||
/** Lieu de la formation */
|
/** Lieu de la formation */
|
||||||
lieu: varchar("lieu", { length: 500 }).notNull(),
|
lieu: varchar("lieu", { length: 500 }).notNull(),
|
||||||
/** Public cible de la séquence (Directeur, Chef de service, Tous, Autre) */
|
/** Public cible de la séquence (Directeur, Chef de service, Autre) */
|
||||||
publicCible: mysqlEnum("publicCible", ["directeur", "chef_service", "tous", "autre"]).notNull(),
|
publicCible: mysqlEnum("publicCible", ["directeur", "chef_service", "autre"]).notNull(),
|
||||||
/** Nom du formateur (optionnel) */
|
|
||||||
formateur: varchar("formateur", { length: 255 }),
|
|
||||||
/** Capacité maximale (12 par défaut) */
|
/** Capacité maximale (12 par défaut) */
|
||||||
capaciteMax: int("capaciteMax").default(12).notNull(),
|
capaciteMax: int("capaciteMax").default(12).notNull(),
|
||||||
/** Date de blocage des inscriptions (J-15 avant la première date) */
|
/** Date de blocage des inscriptions (J-15 avant la première date) */
|
||||||
@@ -158,41 +142,6 @@ export const passwordResetTokens = mysqlTable("passwordResetTokens", {
|
|||||||
export type PasswordResetToken = typeof passwordResetTokens.$inferSelect;
|
export type PasswordResetToken = typeof passwordResetTokens.$inferSelect;
|
||||||
export type InsertPasswordResetToken = typeof passwordResetTokens.$inferInsert;
|
export type InsertPasswordResetToken = typeof passwordResetTokens.$inferInsert;
|
||||||
|
|
||||||
/**
|
|
||||||
* Table des rappels automatiques
|
|
||||||
* Configure les rappels à envoyer avant les formations
|
|
||||||
*/
|
|
||||||
export const rappels = mysqlTable("rappels", {
|
|
||||||
id: int("id").autoincrement().primaryKey(),
|
|
||||||
/** Nom du rappel (ex: "Rappel J-15") */
|
|
||||||
nom: varchar("nom", { length: 255 }).notNull(),
|
|
||||||
/** Nombre de jours avant la formation (ex: 15 pour J-15) */
|
|
||||||
joursAvant: int("joursAvant").notNull(),
|
|
||||||
/** Template d'email à utiliser */
|
|
||||||
emailTemplate: text("emailTemplate").notNull(),
|
|
||||||
/** Actif ou non */
|
|
||||||
actif: boolean("actif").default(true).notNull(),
|
|
||||||
createdAt: timestamp("createdAt").defaultNow().notNull(),
|
|
||||||
updatedAt: timestamp("updatedAt").defaultNow().onUpdateNow().notNull(),
|
|
||||||
});
|
|
||||||
|
|
||||||
export type Rappel = typeof rappels.$inferSelect;
|
|
||||||
export type InsertRappel = typeof rappels.$inferInsert;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Table des envois de rappels
|
|
||||||
* Historique des rappels envoyés pour éviter les doublons
|
|
||||||
*/
|
|
||||||
export const rappelsEnvoyes = mysqlTable("rappelsEnvoyes", {
|
|
||||||
id: int("id").autoincrement().primaryKey(),
|
|
||||||
rappelId: int("rappelId").notNull(),
|
|
||||||
inscriptionId: int("inscriptionId").notNull(),
|
|
||||||
dateEnvoi: timestamp("dateEnvoi").defaultNow().notNull(),
|
|
||||||
});
|
|
||||||
|
|
||||||
export type RappelEnvoye = typeof rappelsEnvoyes.$inferSelect;
|
|
||||||
export type InsertRappelEnvoye = typeof rappelsEnvoyes.$inferInsert;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Table des templates d'emails personnalisables
|
* Table des templates d'emails personnalisables
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -20,16 +20,10 @@ export function registerOAuthRoutes(app: Express) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
console.log("[OAuth] Starting callback with code:", code?.substring(0, 10) + "...");
|
|
||||||
|
|
||||||
const tokenResponse = await sdk.exchangeCodeForToken(code, state);
|
const tokenResponse = await sdk.exchangeCodeForToken(code, state);
|
||||||
console.log("[OAuth] Token exchange successful");
|
|
||||||
|
|
||||||
const userInfo = await sdk.getUserInfo(tokenResponse.accessToken);
|
const userInfo = await sdk.getUserInfo(tokenResponse.accessToken);
|
||||||
console.log("[OAuth] User info received:", { openId: userInfo.openId, email: userInfo.email, name: userInfo.name });
|
|
||||||
|
|
||||||
if (!userInfo.openId) {
|
if (!userInfo.openId) {
|
||||||
console.error("[OAuth] Missing openId in user info");
|
|
||||||
res.status(400).json({ error: "openId missing from user info" });
|
res.status(400).json({ error: "openId missing from user info" });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -41,17 +35,14 @@ export function registerOAuthRoutes(app: Express) {
|
|||||||
loginMethod: userInfo.loginMethod ?? userInfo.platform ?? null,
|
loginMethod: userInfo.loginMethod ?? userInfo.platform ?? null,
|
||||||
lastSignedIn: new Date(),
|
lastSignedIn: new Date(),
|
||||||
});
|
});
|
||||||
console.log("[OAuth] User upserted successfully");
|
|
||||||
|
|
||||||
const sessionToken = await sdk.createSessionToken(userInfo.openId, {
|
const sessionToken = await sdk.createSessionToken(userInfo.openId, {
|
||||||
name: userInfo.name || "",
|
name: userInfo.name || "",
|
||||||
expiresInMs: ONE_YEAR_MS,
|
expiresInMs: ONE_YEAR_MS,
|
||||||
});
|
});
|
||||||
console.log("[OAuth] Session token created");
|
|
||||||
|
|
||||||
const cookieOptions = getSessionCookieOptions(req);
|
const cookieOptions = getSessionCookieOptions(req);
|
||||||
res.cookie(COOKIE_NAME, sessionToken, { ...cookieOptions, maxAge: ONE_YEAR_MS });
|
res.cookie(COOKIE_NAME, sessionToken, { ...cookieOptions, maxAge: ONE_YEAR_MS });
|
||||||
console.log("[OAuth] Cookie set, redirecting to /");
|
|
||||||
|
|
||||||
res.redirect(302, "/");
|
res.redirect(302, "/");
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
121
server/db.ts
121
server/db.ts
@@ -5,7 +5,6 @@ import {
|
|||||||
users,
|
users,
|
||||||
formations,
|
formations,
|
||||||
apprenants,
|
apprenants,
|
||||||
formateurs,
|
|
||||||
sequences,
|
sequences,
|
||||||
datesFormation,
|
datesFormation,
|
||||||
inscriptions,
|
inscriptions,
|
||||||
@@ -19,13 +18,10 @@ import {
|
|||||||
InsertInscription,
|
InsertInscription,
|
||||||
InsertFormation,
|
InsertFormation,
|
||||||
InsertApprenant,
|
InsertApprenant,
|
||||||
InsertFormateur,
|
|
||||||
InsertRappel,
|
|
||||||
Sequence,
|
Sequence,
|
||||||
DateFormation,
|
DateFormation,
|
||||||
Apprenant,
|
Apprenant,
|
||||||
Formation,
|
Formation,
|
||||||
Formateur,
|
|
||||||
EmailTemplate,
|
EmailTemplate,
|
||||||
InsertEmailTemplate
|
InsertEmailTemplate
|
||||||
} from "../drizzle/schema";
|
} from "../drizzle/schema";
|
||||||
@@ -660,120 +656,3 @@ export async function updateEmailConfig(id: number, data: Partial<InsertEmailCon
|
|||||||
})
|
})
|
||||||
.where(eq(emailConfig.id, id));
|
.where(eq(emailConfig.id, id));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===== FORMATEURS =====
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Récupérer tous les formateurs actifs
|
|
||||||
*/
|
|
||||||
export async function getFormateurs() {
|
|
||||||
const db = await getDb();
|
|
||||||
if (!db) return [];
|
|
||||||
|
|
||||||
const result = await db.select().from(formateurs).where(eq(formateurs.actif, true));
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Créer un nouveau formateur
|
|
||||||
*/
|
|
||||||
export async function createFormateur(data: InsertFormateur) {
|
|
||||||
const db = await getDb();
|
|
||||||
if (!db) return null;
|
|
||||||
|
|
||||||
const result = await db.insert(formateurs).values(data);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Supprimer un formateur (désactivation logique)
|
|
||||||
*/
|
|
||||||
export async function deleteFormateur(id: number) {
|
|
||||||
const db = await getDb();
|
|
||||||
if (!db) return;
|
|
||||||
|
|
||||||
await db.update(formateurs).set({ actif: false }).where(eq(formateurs.id, id));
|
|
||||||
}
|
|
||||||
|
|
||||||
// ===== RAPPELS =====
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Récupérer tous les rappels
|
|
||||||
*/
|
|
||||||
export async function getRappels() {
|
|
||||||
const db = await getDb();
|
|
||||||
if (!db) return [];
|
|
||||||
|
|
||||||
const { rappels } = await import("../drizzle/schema");
|
|
||||||
const result = await db.select().from(rappels);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Créer un nouveau rappel
|
|
||||||
*/
|
|
||||||
export async function createRappel(data: InsertRappel) {
|
|
||||||
const db = await getDb();
|
|
||||||
if (!db) return null;
|
|
||||||
|
|
||||||
const { rappels } = await import("../drizzle/schema");
|
|
||||||
const result = await db.insert(rappels).values(data);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Mettre à jour un rappel
|
|
||||||
*/
|
|
||||||
export async function updateRappel(id: number, data: Partial<InsertRappel>) {
|
|
||||||
const db = await getDb();
|
|
||||||
if (!db) return;
|
|
||||||
|
|
||||||
const { rappels } = await import("../drizzle/schema");
|
|
||||||
await db.update(rappels).set({
|
|
||||||
...data,
|
|
||||||
updatedAt: new Date(),
|
|
||||||
}).where(eq(rappels.id, id));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Supprimer un rappel
|
|
||||||
*/
|
|
||||||
export async function deleteRappel(id: number) {
|
|
||||||
const db = await getDb();
|
|
||||||
if (!db) return;
|
|
||||||
|
|
||||||
const { rappels } = await import("../drizzle/schema");
|
|
||||||
await db.delete(rappels).where(eq(rappels.id, id));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Enregistrer l'envoi d'un rappel
|
|
||||||
*/
|
|
||||||
export async function enregistrerRappelEnvoye(rappelId: number, inscriptionId: number) {
|
|
||||||
const db = await getDb();
|
|
||||||
if (!db) return;
|
|
||||||
|
|
||||||
const { rappelsEnvoyes } = await import("../drizzle/schema");
|
|
||||||
await db.insert(rappelsEnvoyes).values({
|
|
||||||
rappelId,
|
|
||||||
inscriptionId,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Vérifier si un rappel a déjà été envoyé
|
|
||||||
*/
|
|
||||||
export async function rappelDejaEnvoye(rappelId: number, inscriptionId: number) {
|
|
||||||
const db = await getDb();
|
|
||||||
if (!db) return false;
|
|
||||||
|
|
||||||
const { rappelsEnvoyes } = await import("../drizzle/schema");
|
|
||||||
const result = await db.select().from(rappelsEnvoyes)
|
|
||||||
.where(and(
|
|
||||||
eq(rappelsEnvoyes.rappelId, rappelId),
|
|
||||||
eq(rappelsEnvoyes.inscriptionId, inscriptionId)
|
|
||||||
))
|
|
||||||
.limit(1);
|
|
||||||
|
|
||||||
return result.length > 0;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ export async function sendInscriptionConfirmation(params: {
|
|||||||
sequenceNom: string;
|
sequenceNom: string;
|
||||||
dates: Array<{ dateDebut: Date; dateFin: Date; ordre: number }>;
|
dates: Array<{ dateDebut: Date; dateFin: Date; ordre: number }>;
|
||||||
lieu: string;
|
lieu: string;
|
||||||
formateur?: string;
|
|
||||||
statut: 'confirmee' | 'liste_attente';
|
statut: 'confirmee' | 'liste_attente';
|
||||||
}): Promise<boolean> {
|
}): Promise<boolean> {
|
||||||
const isConfirmed = params.statut === 'confirmee';
|
const isConfirmed = params.statut === 'confirmee';
|
||||||
@@ -89,7 +88,6 @@ export async function sendInscriptionConfirmation(params: {
|
|||||||
<p><strong>Formation :</strong> ${params.formationNom}</p>
|
<p><strong>Formation :</strong> ${params.formationNom}</p>
|
||||||
<p><strong>Séquence :</strong> ${params.sequenceNom}</p>
|
<p><strong>Séquence :</strong> ${params.sequenceNom}</p>
|
||||||
<p><strong>Lieu :</strong> ${params.lieu}</p>
|
<p><strong>Lieu :</strong> ${params.lieu}</p>
|
||||||
${params.formateur ? `<p><strong>Formateur :</strong> ${params.formateur}</p>` : ''}
|
|
||||||
<h4>Dates de formation (${params.dates.length} séance${params.dates.length > 1 ? 's' : ''}) :</h4>
|
<h4>Dates de formation (${params.dates.length} séance${params.dates.length > 1 ? 's' : ''}) :</h4>
|
||||||
${datesHTML}
|
${datesHTML}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -72,25 +72,6 @@ export const appRouter = router({
|
|||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// ===== FORMATEURS =====
|
|
||||||
formateurs: router({
|
|
||||||
list: adminProcedure.query(async () => {
|
|
||||||
return db.getFormateurs();
|
|
||||||
}),
|
|
||||||
|
|
||||||
create: adminProcedure.input(z.object({
|
|
||||||
nom: z.string().min(1),
|
|
||||||
})).mutation(async ({ input }) => {
|
|
||||||
await db.createFormateur(input);
|
|
||||||
return { success: true };
|
|
||||||
}),
|
|
||||||
|
|
||||||
delete: adminProcedure.input(z.object({ id: z.number() })).mutation(async ({ input }) => {
|
|
||||||
await db.deleteFormateur(input.id);
|
|
||||||
return { success: true };
|
|
||||||
}),
|
|
||||||
}),
|
|
||||||
|
|
||||||
// ===== APPRENANTS =====
|
// ===== APPRENANTS =====
|
||||||
apprenants: router({
|
apprenants: router({
|
||||||
list: adminProcedure.query(async () => {
|
list: adminProcedure.query(async () => {
|
||||||
@@ -139,12 +120,11 @@ export const appRouter = router({
|
|||||||
sequences: router({
|
sequences: router({
|
||||||
list: adminProcedure.query(async () => {
|
list: adminProcedure.query(async () => {
|
||||||
const seqs = await db.getSequences();
|
const seqs = await db.getSequences();
|
||||||
// Récupérer les dates et le nombre d'inscrits pour chaque séquence
|
// Récupérer les dates pour chaque séquence
|
||||||
const sequencesAvecDates = await Promise.all(
|
const sequencesAvecDates = await Promise.all(
|
||||||
seqs.map(async (seq) => {
|
seqs.map(async (seq) => {
|
||||||
const dates = await db.getDatesBySequence(seq.id);
|
const dates = await db.getDatesBySequence(seq.id);
|
||||||
const nbInscrits = await db.countInscriptionsBySequence(seq.id, 'confirmee');
|
return { ...seq, dates };
|
||||||
return { ...seq, dates, nbInscrits };
|
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
return sequencesAvecDates;
|
return sequencesAvecDates;
|
||||||
@@ -174,8 +154,7 @@ export const appRouter = router({
|
|||||||
formationId: z.number(),
|
formationId: z.number(),
|
||||||
nom: z.string().min(1),
|
nom: z.string().min(1),
|
||||||
lieu: z.string().min(1),
|
lieu: z.string().min(1),
|
||||||
publicCible: z.enum(["directeur", "chef_service", "tous", "autre"]),
|
publicCible: z.enum(["directeur", "chef_service", "autre"]),
|
||||||
formateur: z.string().optional(),
|
|
||||||
capaciteMax: z.number().default(12),
|
capaciteMax: z.number().default(12),
|
||||||
dateBlocage: z.string(),
|
dateBlocage: z.string(),
|
||||||
statut: z.enum(["ouverte", "bloquee", "terminee"]).optional(),
|
statut: z.enum(["ouverte", "bloquee", "terminee"]).optional(),
|
||||||
@@ -214,8 +193,7 @@ export const appRouter = router({
|
|||||||
formationId: z.number(),
|
formationId: z.number(),
|
||||||
nom: z.string().min(1),
|
nom: z.string().min(1),
|
||||||
lieu: z.string().min(1),
|
lieu: z.string().min(1),
|
||||||
publicCible: z.enum(["directeur", "chef_service", "tous", "autre"]),
|
publicCible: z.enum(["directeur", "chef_service", "autre"]),
|
||||||
formateur: z.string().optional(),
|
|
||||||
capaciteMax: z.number(),
|
capaciteMax: z.number(),
|
||||||
dateBlocage: z.string(),
|
dateBlocage: z.string(),
|
||||||
statut: z.enum(["ouverte", "bloquee", "terminee"]),
|
statut: z.enum(["ouverte", "bloquee", "terminee"]),
|
||||||
@@ -349,7 +327,6 @@ export const appRouter = router({
|
|||||||
ordre: d.ordre,
|
ordre: d.ordre,
|
||||||
})),
|
})),
|
||||||
lieu: inscriptionSequence.lieu,
|
lieu: inscriptionSequence.lieu,
|
||||||
formateur: inscriptionSequence.formateur || undefined,
|
|
||||||
statut,
|
statut,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -690,40 +667,6 @@ export const appRouter = router({
|
|||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// ===== RAPPELS =====
|
|
||||||
rappels: router({
|
|
||||||
list: adminProcedure.query(async () => {
|
|
||||||
return db.getRappels();
|
|
||||||
}),
|
|
||||||
|
|
||||||
create: adminProcedure.input(z.object({
|
|
||||||
nom: z.string().min(1),
|
|
||||||
joursAvant: z.number().min(1),
|
|
||||||
emailTemplate: z.string().min(1),
|
|
||||||
actif: z.boolean().default(true),
|
|
||||||
})).mutation(async ({ input }) => {
|
|
||||||
await db.createRappel(input);
|
|
||||||
return { success: true };
|
|
||||||
}),
|
|
||||||
|
|
||||||
update: adminProcedure.input(z.object({
|
|
||||||
id: z.number(),
|
|
||||||
nom: z.string().min(1).optional(),
|
|
||||||
joursAvant: z.number().min(1).optional(),
|
|
||||||
emailTemplate: z.string().min(1).optional(),
|
|
||||||
actif: z.boolean().optional(),
|
|
||||||
})).mutation(async ({ input }) => {
|
|
||||||
const { id, ...data } = input;
|
|
||||||
await db.updateRappel(id, data);
|
|
||||||
return { success: true };
|
|
||||||
}),
|
|
||||||
|
|
||||||
delete: adminProcedure.input(z.object({ id: z.number() })).mutation(async ({ input }) => {
|
|
||||||
await db.deleteRappel(input.id);
|
|
||||||
return { success: true };
|
|
||||||
}),
|
|
||||||
}),
|
|
||||||
|
|
||||||
emailConfig: router({
|
emailConfig: router({
|
||||||
get: adminProcedure.query(async () => {
|
get: adminProcedure.query(async () => {
|
||||||
return db.getActiveEmailConfig();
|
return db.getActiveEmailConfig();
|
||||||
|
|||||||
76
todo.md
76
todo.md
@@ -242,75 +242,9 @@
|
|||||||
- [x] Ajouter le lien dans le menu de navigation
|
- [x] Ajouter le lien dans le menu de navigation
|
||||||
- [x] Tester la configuration et l'envoi d'emails
|
- [x] Tester la configuration et l'envoi d'emails
|
||||||
|
|
||||||
## Correction erreur OAuth callback failed
|
## Amélioration disposition formulaire modification séquences
|
||||||
|
|
||||||
- [x] Vérifier les logs du serveur pour identifier l'erreur exacte (colonne openId manquante)
|
- [x] Réorganiser les champs du formulaire pour éviter tout chevauchement
|
||||||
- [x] Corriger le problème dans le code OAuth (ajout manuel des colonnes openId et loginMethod)
|
- [x] Ajouter les champs Public cible et Formateur dans le formulaire de modification
|
||||||
- [x] Tester l'authentification OAuth complète
|
- [x] Séparer Public cible et Formateur sur une ligne dédiée
|
||||||
|
- [x] Tester la disposition sur différentes tailles d'écran
|
||||||
## Ajout "Tous" dans les publics cible
|
|
||||||
|
|
||||||
- [x] Localiser où la liste des publics cible est définie dans le code
|
|
||||||
- [x] Ajouter "Tous" dans la liste des publics cible (schéma DB + frontend)
|
|
||||||
- [x] Mettre à jour AdminSequences.tsx (types, options, badges violet)
|
|
||||||
- [x] Mettre à jour AdminSequenceInscrits.tsx (labels et badges)
|
|
||||||
- [x] Mettre à jour AdminRapportPublicCible.tsx (labels et badges)
|
|
||||||
- [x] Mettre à jour Inscription.tsx (mapping, affichage, logique d'alerte)
|
|
||||||
- [x] Tester l'affichage dans le formulaire de création/édition de séquence
|
|
||||||
|
|
||||||
## Corrections demandées - Gestion des séquences
|
|
||||||
|
|
||||||
- [x] Ajouter le champ "Public cible" dans le dialogue de modification des séquences
|
|
||||||
- [x] Afficher "nombre d'inscrits / capacité" dans la colonne capacité du tableau des séquences
|
|
||||||
|
|
||||||
## Ajout du champ Formateur dans les séquences
|
|
||||||
|
|
||||||
- [x] Ajouter la colonne "formateur" dans la table sequences (texte nullable)
|
|
||||||
- [x] Mettre à jour les procédures tRPC create et update pour inclure le champ formateur
|
|
||||||
- [x] Ajouter le champ formateur dans le formulaire de création de séquence
|
|
||||||
- [x] Ajouter le champ formateur dans le formulaire de modification de séquence
|
|
||||||
- [x] Tester la création et modification avec le nouveau champ
|
|
||||||
|
|
||||||
## Améliorations du champ Formateur
|
|
||||||
|
|
||||||
- [x] Afficher le formateur dans le tableau des séquences (nouvelle colonne)
|
|
||||||
- [x] Créer une table formateurs dans la base de données
|
|
||||||
- [x] Ajouter les procédures tRPC pour gérer les formateurs (CRUD)
|
|
||||||
- [x] Remplacer le champ texte par un composant avec autocomplétion
|
|
||||||
- [x] Permettre l'ajout rapide de nouveaux formateurs depuis le formulaire
|
|
||||||
- [x] Ajouter le formateur dans les templates d'emails d'invitation
|
|
||||||
- [x] Tester l'autocomplétion et l'affichage dans les emails
|
|
||||||
|
|
||||||
## Améliorations de la gestion des séquences
|
|
||||||
|
|
||||||
### 1. Indicateur visuel de remplissage
|
|
||||||
- [x] Créer un composant ProgressBar avec couleurs (vert/orange/rouge)
|
|
||||||
- [x] Intégrer la barre de progression dans la colonne capacité du tableau
|
|
||||||
- [x] Définir les seuils de couleur (vert <70%, orange 70-90%, rouge >90%)
|
|
||||||
|
|
||||||
### 2. Vue calendrier des séquences
|
|
||||||
- [x] Créer la page AdminCalendrier.tsx
|
|
||||||
- [x] Intégrer un composant calendrier mensuel
|
|
||||||
- [x] Afficher les séquences sur les dates correspondantes
|
|
||||||
- [x] Ajouter la navigation mois précédent/suivant
|
|
||||||
- [x] Permettre le clic sur une séquence pour voir les détails
|
|
||||||
- [x] Ajouter le lien dans le menu de navigation
|
|
||||||
|
|
||||||
### 3. Rappels automatiques personnalisables
|
|
||||||
- [x] Créer une table rappels dans la base de données
|
|
||||||
- [x] Ajouter les procédures tRPC pour gérer les rappels
|
|
||||||
- [x] Créer la page de configuration des rappels
|
|
||||||
- [x] Permettre de définir plusieurs rappels (J-15, J-7, J-1)
|
|
||||||
- [x] Associer un template d'email à chaque rappel
|
|
||||||
- [x] Interface de gestion complète (création, modification, suppression)
|
|
||||||
- [ ] Implémenter le système d'envoi automatique des rappels (nécessite service externe)
|
|
||||||
- [ ] Ajouter un job/cron pour vérifier et envoyer les rappels (nécessite service externe)
|
|
||||||
|
|
||||||
## Correction bug AdminSequences
|
|
||||||
|
|
||||||
- [x] Ajouter l'import de useMemo dans AdminSequences.tsx
|
|
||||||
|
|
||||||
## Corrections d'affichage - Page Séquences
|
|
||||||
|
|
||||||
- [x] Redimensionner la fenêtre de modification des séquences (éviter chevauchement formateur/capacité)
|
|
||||||
- [x] Ajuster l'espacement entre capacité et pourcentage dans la barre de progression
|
|
||||||
|
|||||||
Reference in New Issue
Block a user