@prefix schema: <https://schema.org/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix leptum: <https://mpeters.dev/ns/leptum#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

leptum:GroceryNotificationShape
  a sh:NodeShape ;
  rdfs:comment "Mirrors GroceryNotification (types/grocery.ts) as written by groceryNotificationToRdf and read by extractGroceryNotification. leptum:item is an array of blank nodes (GroceryShoppingBriefItem); storeName/distance/totalEstimatedPrice/totalEstimatedWeightKg are computed client-side and not persisted, so they are not modeled here." ;
  sh:targetClass leptum:GroceryNotification ;
  sh:property [
    sh:path schema:about ;
    sh:nodeKind sh:IRI ;
    sh:maxCount 1
  ] ;
  sh:property [
    sh:path leptum:status ;
    sh:datatype xsd:string ;
    sh:maxCount 1
  ] ;
  sh:property [
    sh:path leptum:score ;
    sh:datatype xsd:decimal ;
    sh:maxCount 1
  ] ;
  sh:property [
    sh:path leptum:item ;
    sh:node leptum:GroceryItemShape
  ] ;
  sh:property [
    sh:path dcterms:created ;
    sh:datatype xsd:dateTime ;
    sh:maxCount 1
  ] .

leptum:GroceryItemShape
  a sh:NodeShape ;
  sh:property [
    sh:path leptum:itemName ;
    sh:datatype xsd:string ;
    sh:maxCount 1
  ] ;
  sh:property [
    sh:path leptum:itemQuantity ;
    sh:datatype xsd:decimal ;
    sh:maxCount 1
  ] ;
  sh:property [
    sh:path leptum:itemUnit ;
    sh:datatype xsd:string ;
    sh:maxCount 1
  ] ;
  sh:property [
    sh:path leptum:itemEstimatedPrice ;
    sh:datatype xsd:decimal ;
    sh:maxCount 1
  ] ;
  sh:property [
    sh:path leptum:itemPricePerUnit ;
    sh:datatype xsd:decimal ;
    sh:maxCount 1
  ] ;
  sh:property [
    sh:path leptum:itemIsOnSale ;
    sh:datatype xsd:boolean ;
    sh:maxCount 1
  ] ;
  sh:property [
    sh:path leptum:itemSalePrice ;
    sh:datatype xsd:decimal ;
    sh:maxCount 1
  ] ;
  sh:property [
    sh:path leptum:itemIsRecurring ;
    sh:datatype xsd:boolean ;
    sh:maxCount 1
  ] ;
  sh:property [
    sh:path leptum:itemDaysOverdue ;
    sh:datatype xsd:decimal ;
    sh:maxCount 1
  ] ;
  sh:property [
    sh:path leptum:itemEstimatedWeightKg ;
    sh:datatype xsd:decimal ;
    sh:maxCount 1
  ] .
