Collection archetypes
Collection archetypes
Stocke les archétypes qui classifient les articles du catalogue.
Un archétype représente une famille de pièces (ex. "filtre à huile", "plaquettes de frein").
Il peut être global ou surchargé par tenant via ArchetypeOverride.
Métadonnées
Service propriétaire |
|
Tenant scope |
Partiel (champ |
Soft delete |
Oui (champ |
Index principaux |
|
Schéma
interface Archetype {
_id: ObjectId;
company?: ObjectId; // absent = archétype global
domain: string; // domaine fonctionnel (ex. "auto")
archetype_id: string; // identifiant métier
// Références croisées
tecdoc_id?: string;
vanheck_id?: string;
etai_id?: string;
aces_id?: string;
unspsc_code?: string;
name: string;
synonyms?: string[];
description: string;
required_specs?: string[]; // spécifications obligatoires pour cet archétype
uom_default?: string; // unité de mesure par défaut
hs_code?: string; // code douanier
hazard_class?: string;
vat_rate?: number;
is_active: boolean; // défaut : true
badges?: string[];
created_by?: ObjectId;
updated_by?: ObjectId;
created_at: Date;
updated_at: Date;
// Virtuel populé
overrides?: ArchetypeOverride[];
}