chore: retire legacy model catalogs

This commit is contained in:
MatthieuTD
2025-10-02 16:29:50 +02:00
parent 386a1c9d1b
commit c5f2c568b6
19 changed files with 1234 additions and 3597 deletions

View File

@@ -1,20 +1,39 @@
import { useRequestFetch } from '#imports';
import type { FetchOptions } from 'ofetch';
import type {
ComponentModelStructure,
PieceModelStructure,
} from '~/shared/types/inventory';
export type ModelCategory = 'COMPONENT' | 'PIECE';
export interface ModelTypePayload {
export type ModelTypeStructure = ComponentModelStructure | PieceModelStructure | null;
export interface BaseModelTypePayload {
name: string;
code: string;
category: ModelCategory;
notes?: string | null;
description?: string | null;
}
export interface ModelType extends ModelTypePayload {
export interface ComponentModelTypePayload extends BaseModelTypePayload {
category: 'COMPONENT';
structure?: ComponentModelStructure | null;
}
export interface PieceModelTypePayload extends BaseModelTypePayload {
category: 'PIECE';
structure?: PieceModelStructure | null;
}
export type ModelTypePayload = ComponentModelTypePayload | PieceModelTypePayload;
export interface ModelType extends BaseModelTypePayload {
id: string;
createdAt: string;
updatedAt: string;
category: ModelCategory;
structure: ModelTypeStructure;
}
export interface ModelTypeListParams {