chore: retire legacy model catalogs
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user