export interface Article {
  reference: string;
  designation: string;
  designation_complementaire?: string;

  code_ean?: string;
  code_barre?: string;

  prix_vente: number;
  prix_achat?: number;
  prix_revient?: number;

  stock_reel: number;
  stock_mini?: number;
  stock_maxi?: number;
  stock_reserve?: number;
  stock_commande?: number;
  stock_disponible?: number;

  description?: string;

  type_article?: number;
  type_article_libelle?: string;

  famille_code?: string;
  famille_libelle?: string;

  fournisseur_principal?: string;
  fournisseur_nom?: string;

  unite_vente?: string;
  unite_achat?: string;

  poids?: number;
  volume?: number;

  est_actif?: boolean;
  en_sommeil?: boolean;

  tva_code?: string;
  tva_taux?: number;

  date_creation?: string | null;
  publie?: boolean;
  date_modification?: string | null;
}



export interface ArticleRequest {
  reference: string,
  designation: string,
  famille: string,
  prix_vente: number,
  prix_achat: number,
  stock_maxi: number,
  code_ean: string,
  description: string,
  stock_reel: number;
  stock_mini?: number;
  publie?: boolean;
}



export interface StockRequest {
  commentaire?: string,
  date_entree?: string,
  depot_code?: string,
  lignes: [
    {
      article_ref: string,
      quantite: number,
      stock_mini: number,
      stock_maxi: number
    }
  ],
  reference?: string
}

export interface StockResponse {
  article_ref: string,
  numero: string,
  type: number,
  type_libelle: string,
  date: string,
  reference: string,
  nb_lignes: number
}

export interface ArticleUpdateRequest {
  designation: string,
  famille: string,
  prix_vente: number,
  prix_achat: number,
  stock_maxi: number,
  code_ean: string,
  description: string;
  stock_reel: number;
  stock_mini?: number;
  publie?: boolean;
}
