@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <https://schema.org/> .
@prefix dpp: <https://ns.verisav.fr/dpp#> .
@prefix rma: <https://ns.verisav.fr/rma#> .
@prefix wty: <https://ns.verisav.fr/wty#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix dcterms: <http://purl.org/dc/terms/> .

# ============================================================================
# Example: Complete Warranty Scenario with Assessment and Invoice
# This comprehensive example demonstrates the full warranty workflow:
# - Warranty definition with coverage, exclusions, payment rules, limits
# - Claim assessment against warranty
# - Automated invoice generation
# Product: Electric vehicle
# ============================================================================

<https://verisav.fr/data/wty-examples/demo-complete-warranty#warranty>
    a wty:Warranty, dpp:Warranty ;
    dcterms:title "Complete Warranty Example - Electric Vehicle"@en, "Exemple Complet de Garantie - Véhicule Électrique"@fr ;
    schema:name "Premium EV Warranty" ;
    dpp:warrantyType "extension" ;
    dpp:warrantyStatus "active" ;
    dpp:warrantyStartDate "2025-01-10"^^xsd:date ;
    dpp:warrantyEndDate "2028-01-10"^^xsd:date ;
    dpp:warrantyDurationMonths 36 ;
    
    # Product covered
    dpp:hasWarranty <https://verisav.fr/data/wty-examples/demo-complete-warranty#product> ;
    
    # Coverage
    wty:definesCoverage <https://verisav.fr/data/wty-examples/demo-complete-warranty#coverage> ;
    
    # Exclusions
    wty:definesExclusions <https://verisav.fr/data/wty-examples/demo-complete-warranty#exclusion1> ;
    wty:definesExclusions <https://verisav.fr/data/wty-examples/demo-complete-warranty#exclusion2> ;
    
    # Payment rules
    wty:definesPaymentRule <https://verisav.fr/data/wty-examples/demo-complete-warranty#payment-rule> ;
    
    # Limits
    wty:definesLimits <https://verisav.fr/data/wty-examples/demo-complete-warranty#limit> ;
    
    # Conditions
    wty:definesConditions <https://verisav.fr/data/wty-examples/demo-complete-warranty#condition1> ;
    wty:definesConditions <https://verisav.fr/data/wty-examples/demo-complete-warranty#condition2> .

<https://verisav.fr/data/wty-examples/demo-complete-warranty#product>
    a dpp:ProductPassport, schema:Product ;
    schema:name "Electric Vehicle Model 2025" ;
    schema:sku "EV-2025-PRO" ;
    dpp:serialNumber "EV-2025-12345" ;
    dpp:purchaseDate "2025-01-10"^^xsd:date .

<https://verisav.fr/data/wty-examples/demo-complete-warranty#coverage>
    a wty:Coverage ;
    wty:coveragePeriod "36_months" ;
    wty:coverageStartDate "2025-01-10"^^xsd:date ;
    wty:coverageEndDate "2028-01-10"^^xsd:date ;
    wty:coversComponent <https://verisav.fr/data/wty-examples/demo-complete-warranty#battery> ;
    wty:coversComponent <https://verisav.fr/data/wty-examples/demo-complete-warranty#motor> ;
    wty:coversComponent <https://verisav.fr/data/wty-examples/demo-complete-warranty#electronics> ;
    wty:coversDefectType <https://verisav.fr/data/wty-examples/demo-complete-warranty#manufacturing-defect> ;
    wty:coversRepairType <https://verisav.fr/data/wty-examples/demo-complete-warranty#repair> ;
    wty:coversRepairType <https://verisav.fr/data/wty-examples/demo-complete-warranty#replacement> .

<https://verisav.fr/data/wty-examples/demo-complete-warranty#battery>
    a schema:Product ;
    schema:name "Battery Pack" .

<https://verisav.fr/data/wty-examples/demo-complete-warranty#motor>
    a schema:Product ;
    schema:name "Electric Motor" .

<https://verisav.fr/data/wty-examples/demo-complete-warranty#electronics>
    a schema:Product ;
    schema:name "Electronic Control Unit" .

<https://verisav.fr/data/wty-examples/demo-complete-warranty#manufacturing-defect>
    a schema:Thing ;
    schema:name "Manufacturing Defect" .

<https://verisav.fr/data/wty-examples/demo-complete-warranty#repair>
    a dpp:Intervention ;
    schema:name "Repair" .

<https://verisav.fr/data/wty-examples/demo-complete-warranty#replacement>
    a dpp:Intervention ;
    schema:name "Replacement" .

<https://verisav.fr/data/wty-examples/demo-complete-warranty#exclusion1>
    a wty:Exclusion ;
    wty:excludedDefectType <https://verisav.fr/data/wty-examples/demo-complete-warranty#accident-damage> ;
    wty:excludedCause <https://verisav.fr/data/wty-examples/demo-complete-warranty#collision> .

<https://verisav.fr/data/wty-examples/demo-complete-warranty#accident-damage>
    a schema:Thing ;
    schema:name "Accident Damage" .

<https://verisav.fr/data/wty-examples/demo-complete-warranty#collision>
    a schema:Thing ;
    schema:name "Collision" .

<https://verisav.fr/data/wty-examples/demo-complete-warranty#exclusion2>
    a wty:Exclusion ;
    wty:excludedDefectType <https://verisav.fr/data/wty-examples/demo-complete-warranty#normal-wear> ;
    wty:excludedCause <https://verisav.fr/data/wty-examples/demo-complete-warranty#wear> .

<https://verisav.fr/data/wty-examples/demo-complete-warranty#normal-wear>
    a schema:Thing ;
    schema:name "Normal Wear" .

<https://verisav.fr/data/wty-examples/demo-complete-warranty#wear>
    a schema:Thing ;
    schema:name "Wear" .

<https://verisav.fr/data/wty-examples/demo-complete-warranty#payment-rule>
    a wty:PaymentRule ;
    wty:paymentPercentage "100"^^xsd:decimal ;
    wty:hasPaymentLimit true ;
    wty:paysFor <https://verisav.fr/data/wty-examples/demo-complete-warranty#diagnostic> ;
    wty:paysFor <https://verisav.fr/data/wty-examples/demo-complete-warranty#repair-service> ;
    wty:paysFor <https://verisav.fr/data/wty-examples/demo-complete-warranty#parts> ;
    wty:firstParty <https://verisav.fr/data/wty-examples/demo-complete-warranty#warranty-provider> .

<https://verisav.fr/data/wty-examples/demo-complete-warranty#diagnostic>
    a dpp:Diagnostic ;
    schema:name "Diagnostic" .

<https://verisav.fr/data/wty-examples/demo-complete-warranty#repair-service>
    a dpp:Intervention ;
    schema:name "Repair Service" .

<https://verisav.fr/data/wty-examples/demo-complete-warranty#parts>
    a dpp:ReplacementPart ;
    schema:name "Replacement Parts" .

<https://verisav.fr/data/wty-examples/demo-complete-warranty#warranty-provider>
    a schema:Organization ;
    schema:name "EV Warranty Solutions" ;
    schema:url "https://www.evwarranty.example" .

<https://verisav.fr/data/wty-examples/demo-complete-warranty#limit>
    a wty:Limit ;
    wty:limitType "total" ;
    wty:limitAmount "15000.00"^^xsd:decimal ;
    wty:limitCurrency "EUR" ;
    wty:limitPeriod "warranty_period" .

<https://verisav.fr/data/wty-examples/demo-complete-warranty#condition1>
    a wty:Condition ;
    wty:conditionType "normal_use" ;
    wty:conditionDescription "Vehicle must be used normally and maintained according to manufacturer schedule."@en, "Le véhicule doit être utilisé normalement et entretenu selon le calendrier du fabricant."@fr ;
    wty:requiresDocumentation true ;
    wty:requiresProof false ;
    wty:validityPeriod "warranty_period" .

<https://verisav.fr/data/wty-examples/demo-complete-warranty#condition2>
    a wty:Condition ;
    wty:conditionType "proper_maintenance" ;
    wty:conditionDescription "All scheduled maintenance must be performed by authorized service centers."@en, "Tous les entretiens programmés doivent être effectués par des centres de service autorisés."@fr ;
    wty:requiresDocumentation true ;
    wty:requiresProof true ;
    wty:validityPeriod "warranty_period" .

# ============================================================================
# Claim Assessment
# ============================================================================

<https://verisav.fr/data/wty-examples/demo-complete-warranty#assessment>
    a wty:ClaimAssessment ;
    wty:assessmentDate "2025-10-15T09:00:00+02:00"^^xsd:dateTime ;
    wty:assessmentResult "covered" ;
    wty:assessmentReason "Battery degradation is a manufacturing defect covered by warranty. No exclusions apply. Within coverage period and limits."@en, "La dégradation de la batterie est un défaut de fabrication couvert par la garantie. Aucune exclusion ne s'applique. Dans la période de couverture et les limites."@fr ;
    wty:coveredAmount "4500.00"^^xsd:decimal ;
    wty:coveredCurrency "EUR" ;
    wty:customerResponsibility "0.00"^^xsd:decimal ;
    
    # Claim being assessed
    wty:assessesClaim <https://verisav.fr/data/wty-examples/demo-complete-warranty#claim> ;
    
    # Coverage applied
    wty:appliedCoverage <https://verisav.fr/data/wty-examples/demo-complete-warranty#coverage> ;
    
    # Payment decision
    wty:paymentDecision <https://verisav.fr/data/wty-examples/demo-complete-warranty#payment-rule> ;
    
    # Invoice generated
    wty:generatesInvoice <https://verisav.fr/data/wty-examples/demo-complete-warranty#invoice> .

<https://verisav.fr/data/wty-examples/demo-complete-warranty#claim>
    a dpp:WarrantyClaim ;
    schema:description "Battery capacity dropped to 60% after 18 months - manufacturing defect suspected"@en, "Capacité de la batterie tombée à 60% après 18 mois - défaut de fabrication suspecté"@fr ;
    schema:dateCreated "2025-10-10T14:00:00+02:00"^^xsd:dateTime ;
    schema:status "Resolved" .

<https://verisav.fr/data/wty-examples/demo-complete-warranty#invoice>
    a wty:Invoice, schema:Invoice ;
    wty:invoiceNumber "INV-2025-08901" ;
    wty:invoiceAmount "4500.00"^^xsd:decimal ;
    wty:invoiceCurrency "EUR" ;
    wty:invoiceDate "2025-10-15T10:00:00+02:00"^^xsd:dateTime ;
    wty:invoiceStatus "paid" ;
    wty:invoices <https://verisav.fr/data/wty-examples/demo-complete-warranty#intervention> ;
    wty:payer <https://verisav.fr/data/wty-examples/demo-complete-warranty#warranty-provider> .

<https://verisav.fr/data/wty-examples/demo-complete-warranty#intervention>
    a dpp:Intervention ;
    dpp:interventionType "reparation" ;
    dpp:interventionStartDate "2025-10-12T08:00:00+02:00"^^xsd:dateTime ;
    dpp:interventionEndDate "2025-10-14T17:00:00+02:00"^^xsd:dateTime ;
    dpp:totalCost "4500.00"^^xsd:decimal ;
    dpp:laborCost "1500.00"^^xsd:decimal ;
    dpp:partsCost "3000.00"^^xsd:decimal ;
    dpp:resolutionDescription "Battery pack replaced with new unit"@en, "Bloc batterie remplacé par une unité neuve"@fr .

