Skip to main content

datasynth_core/models/sourcing/
catalog.rs

1//! Catalog item models for contract-based ordering.
2
3use rust_decimal::Decimal;
4use serde::{Deserialize, Serialize};
5
6/// A catalog item available for ordering under a contract.
7#[derive(Debug, Clone, Serialize, Deserialize)]
8pub struct CatalogItem {
9    /// Unique catalog item identifier
10    pub catalog_item_id: String,
11    /// Contract ID this item belongs to
12    pub contract_id: String,
13    /// Contract line item number
14    pub contract_line_number: u16,
15    /// Vendor ID
16    pub vendor_id: String,
17    /// Material ID
18    pub material_id: Option<String>,
19    /// Item description
20    pub description: String,
21    /// Catalog price (from contract)
22    #[serde(with = "rust_decimal::serde::str")]
23    pub catalog_price: Decimal,
24    /// Unit of measure
25    pub uom: String,
26    /// Whether this is the preferred item for this material
27    pub is_preferred: bool,
28    /// Category for search/browse
29    pub category: String,
30    /// Minimum order quantity
31    pub min_order_quantity: Option<Decimal>,
32    /// Lead time in days
33    pub lead_time_days: Option<u32>,
34    /// Is item active and orderable
35    pub is_active: bool,
36}