@prefix sc: <http://ggen.io/ontology/supply-chain#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .

# ============================================================================
# Supply Chain Management Ontology
# Procurement, logistics, warehouse, and demand planning
# ============================================================================

# ----------------------------------------------------------------------------
# Supplier and Vendor Management
# ----------------------------------------------------------------------------

sc:Supplier a owl:Class ;
    rdfs:label "Supplier" ;
    rdfs:comment "Vendor or supplier of goods/services" .

sc:SupplierPerformance a owl:Class ;
    rdfs:label "Supplier Performance" ;
    rdfs:comment "Performance metrics for a supplier" .

sc:SupplierContract a owl:Class ;
    rdfs:label "Supplier Contract" ;
    rdfs:comment "Agreement with supplier" .

# ----------------------------------------------------------------------------
# Procurement
# ----------------------------------------------------------------------------

sc:PurchaseRequisition a owl:Class ;
    rdfs:label "Purchase Requisition" ;
    rdfs:comment "Request to purchase goods/services" .

sc:RequestForQuotation a owl:Class ;
    rdfs:label "Request for Quotation (RFQ)" ;
    rdfs:comment "Request for pricing from suppliers" .

sc:PurchaseOrder a owl:Class ;
    rdfs:label "Purchase Order" ;
    rdfs:comment "Order placed with supplier" .

sc:Receipt a owl:Class ;
    rdfs:label "Goods Receipt" ;
    rdfs:comment "Receipt of goods from supplier" .

# ----------------------------------------------------------------------------
# Shipments and Logistics
# ----------------------------------------------------------------------------

sc:Shipment a owl:Class ;
    rdfs:label "Shipment" ;
    rdfs:comment "Shipment of goods" .

sc:ShipmentLine a owl:Class ;
    rdfs:label "Shipment Line" ;
    rdfs:comment "Individual item in shipment" .

sc:Carrier a owl:Class ;
    rdfs:label "Carrier" ;
    rdfs:comment "Transportation carrier (UPS, FedEx, etc.)" .

sc:Route a owl:Class ;
    rdfs:label "Transportation Route" ;
    rdfs:comment "Route for shipment" .

sc:TrackingEvent a owl:Class ;
    rdfs:label "Tracking Event" ;
    rdfs:comment "Shipment tracking event" .

# ----------------------------------------------------------------------------
# Warehouse Management
# ----------------------------------------------------------------------------

sc:Warehouse a owl:Class ;
    rdfs:label "Warehouse" ;
    rdfs:comment "Storage facility" .

sc:Zone a owl:Class ;
    rdfs:label "Warehouse Zone" ;
    rdfs:comment "Section of warehouse" .

sc:Bin a owl:Class ;
    rdfs:label "Storage Bin" ;
    rdfs:comment "Individual storage location" .

sc:PickList a owl:Class ;
    rdfs:label "Pick List" ;
    rdfs:comment "List of items to pick for orders" .

sc:PackingSlip a owl:Class ;
    rdfs:label "Packing Slip" ;
    rdfs:comment "Document for packed shipment" .

# ----------------------------------------------------------------------------
# Demand Planning
# ----------------------------------------------------------------------------

sc:DemandForecast a owl:Class ;
    rdfs:label "Demand Forecast" ;
    rdfs:comment "Forecasted demand for items" .

sc:SafetyStock a owl:Class ;
    rdfs:label "Safety Stock" ;
    rdfs:comment "Buffer inventory level" .

sc:ReorderPoint a owl:Class ;
    rdfs:label "Reorder Point" ;
    rdfs:comment "Inventory level triggering reorder" .

sc:LeadTime a owl:Class ;
    rdfs:label "Lead Time" ;
    rdfs:comment "Time from order to delivery" .

# ----------------------------------------------------------------------------
# Inventory
# ----------------------------------------------------------------------------

sc:InventoryItem a owl:Class ;
    rdfs:label "Inventory Item" ;
    rdfs:comment "Item in inventory" .

sc:InventoryLevel a owl:Class ;
    rdfs:label "Inventory Level" ;
    rdfs:comment "Quantity on hand at location" .

sc:StockMovement a owl:Class ;
    rdfs:label "Stock Movement" ;
    rdfs:comment "Movement of inventory" .

# ----------------------------------------------------------------------------
# Properties - Supplier
# ----------------------------------------------------------------------------

sc:supplierCode a owl:DatatypeProperty ;
    rdfs:domain sc:Supplier ;
    rdfs:range xsd:string ;
    rdfs:label "Supplier Code" .

sc:supplierName a owl:DatatypeProperty ;
    rdfs:domain sc:Supplier ;
    rdfs:range xsd:string ;
    rdfs:label "Supplier Name" .

sc:onTimeDeliveryRate a owl:DatatypeProperty ;
    rdfs:domain sc:SupplierPerformance ;
    rdfs:range xsd:decimal ;
    rdfs:label "On-Time Delivery Rate %" .

sc:qualityRating a owl:DatatypeProperty ;
    rdfs:domain sc:SupplierPerformance ;
    rdfs:range xsd:decimal ;
    rdfs:label "Quality Rating (0-5)" .

# ----------------------------------------------------------------------------
# Properties - Purchase Orders
# ----------------------------------------------------------------------------

sc:poNumber a owl:DatatypeProperty ;
    rdfs:domain sc:PurchaseOrder ;
    rdfs:range xsd:string ;
    rdfs:label "PO Number" .

sc:orderDate a owl:DatatypeProperty ;
    rdfs:domain sc:PurchaseOrder ;
    rdfs:range xsd:date ;
    rdfs:label "Order Date" .

sc:expectedDeliveryDate a owl:DatatypeProperty ;
    rdfs:domain sc:PurchaseOrder ;
    rdfs:range xsd:date ;
    rdfs:label "Expected Delivery Date" .

sc:supplier a owl:ObjectProperty ;
    rdfs:domain sc:PurchaseOrder ;
    rdfs:range sc:Supplier ;
    rdfs:label "Supplier" .

sc:totalAmount a owl:DatatypeProperty ;
    rdfs:range xsd:decimal ;
    rdfs:label "Total Amount" .

# ----------------------------------------------------------------------------
# Properties - Shipments
# ----------------------------------------------------------------------------

sc:shipmentNumber a owl:DatatypeProperty ;
    rdfs:domain sc:Shipment ;
    rdfs:range xsd:string ;
    rdfs:label "Shipment Number" .

sc:trackingNumber a owl:DatatypeProperty ;
    rdfs:domain sc:Shipment ;
    rdfs:range xsd:string ;
    rdfs:label "Tracking Number" .

sc:carrier a owl:ObjectProperty ;
    rdfs:domain sc:Shipment ;
    rdfs:range sc:Carrier ;
    rdfs:label "Carrier" .

sc:origin a owl:DatatypeProperty ;
    rdfs:range xsd:string ;
    rdfs:label "Origin Location" .

sc:destination a owl:DatatypeProperty ;
    rdfs:range xsd:string ;
    rdfs:label "Destination Location" .

sc:shippedDate a owl:DatatypeProperty ;
    rdfs:domain sc:Shipment ;
    rdfs:range xsd:dateTime ;
    rdfs:label "Shipped Date" .

sc:deliveryDate a owl:DatatypeProperty ;
    rdfs:domain sc:Shipment ;
    rdfs:range xsd:dateTime ;
    rdfs:label "Delivery Date" .

# ----------------------------------------------------------------------------
# Properties - Warehouse
# ----------------------------------------------------------------------------

sc:warehouseCode a owl:DatatypeProperty ;
    rdfs:domain sc:Warehouse ;
    rdfs:range xsd:string ;
    rdfs:label "Warehouse Code" .

sc:binLocation a owl:DatatypeProperty ;
    rdfs:domain sc:Bin ;
    rdfs:range xsd:string ;
    rdfs:label "Bin Location" .

sc:quantityOnHand a owl:DatatypeProperty ;
    rdfs:domain sc:InventoryLevel ;
    rdfs:range xsd:integer ;
    rdfs:label "Quantity on Hand" .

sc:quantityReserved a owl:DatatypeProperty ;
    rdfs:domain sc:InventoryLevel ;
    rdfs:range xsd:integer ;
    rdfs:label "Quantity Reserved" .

sc:quantityAvailable a owl:DatatypeProperty ;
    rdfs:domain sc:InventoryLevel ;
    rdfs:range xsd:integer ;
    rdfs:label "Quantity Available" .

# ----------------------------------------------------------------------------
# Properties - Demand Planning
# ----------------------------------------------------------------------------

sc:forecastQuantity a owl:DatatypeProperty ;
    rdfs:domain sc:DemandForecast ;
    rdfs:range xsd:integer ;
    rdfs:label "Forecasted Quantity" .

sc:forecastPeriod a owl:DatatypeProperty ;
    rdfs:domain sc:DemandForecast ;
    rdfs:range xsd:string ;
    rdfs:label "Forecast Period" .

sc:safetyStockLevel a owl:DatatypeProperty ;
    rdfs:domain sc:SafetyStock ;
    rdfs:range xsd:integer ;
    rdfs:label "Safety Stock Level" .

sc:reorderPointLevel a owl:DatatypeProperty ;
    rdfs:domain sc:ReorderPoint ;
    rdfs:range xsd:integer ;
    rdfs:label "Reorder Point Level" .

sc:leadTimeDays a owl:DatatypeProperty ;
    rdfs:domain sc:LeadTime ;
    rdfs:range xsd:integer ;
    rdfs:label "Lead Time (days)" .

sc:economicOrderQuantity a owl:DatatypeProperty ;
    rdfs:range xsd:integer ;
    rdfs:label "Economic Order Quantity" .

# ----------------------------------------------------------------------------
# Shipment Status
# ----------------------------------------------------------------------------

sc:Pending a sc:ShipmentStatus ;
    rdfs:label "Pending" .

sc:InTransit a sc:ShipmentStatus ;
    rdfs:label "In Transit" .

sc:Delivered a sc:ShipmentStatus ;
    rdfs:label "Delivered" .

sc:Delayed a sc:ShipmentStatus ;
    rdfs:label "Delayed" .
