Trouble modeling the schema

schema

#1

I am able to understand the SPO model like,

John Buys Headphone

But i want to add more properties like

John Buys Headphone for 100$
John Buys Headphone at Jan 1st 2020

is this a valid requirement in cayley or in graph db ???


#2

Well I got an idea, kindly let me know whether it is correct way,

For the above mentioned problem.

TransactionId created_at Jan 1st 2020
TransactionId sold_amount 100$
TransactionId product_sold Headphone

John Did TransactionId

By giving an auto generated UUID for an operation seems like solving my case here. Is that correct ?


#3

Here is how schema.org suggests to model this.

{
  "@context": {
    "@base": "http://schema.org/",
    "@vocab": "http://schema.org/",
    "ex": "http://example.com#"
  },
  "@type": "Order",
  "customer": {
    "@id": "ex:john"
  },
  "itemOffered": {
    "@id": "ex:wh-1000xm3",
    "category": "ex:headphone"
  },
  "acceptedOffer": {
    "@type": "Offer",
    "price": 100,
    "priceCurrency": "USD"
  },
  "orderDate": "2020-02-06"
}