mocha-suv/samples/PrepChart/Zq2/PrepChart.zq2
2025-07-16 18:08:59 -04:00

93 lines
1.3 KiB
Plaintext

// class name id sugarname { }
classIndexBase 13100
attributes {
text `Recipe Name` recipeName
}
relationships {
hasShelfLifeMeasurementUnit {
source shelfLife
type "has"
target shelfLifeMeasurementUnit
singular false
sibling {
type "for"
}
}
hasPrepChartItem {
source prepchart
type "has"
target prepchartitem
singular false
sibling {
type "for"
}
}
}
class `Recipe Shelf Life` shelfLife {
attribute shelfLifeAmount
relationship hasShelfLifeMeasurementUnit
}
class `Recipe Shelf Life Measurement Unit` shelfLifeMeasurementUnit {
attribute shelfLifeAmount
relationship hasShelfLifeMeasurementUnit
}
module `Prep Chart` prepchartmodule {
class `Prep Chart` prepchart {
attributes {
name
}
relationships {
hasPrepChartItem items
}
constructors {
name
}
}
class `Prep Chart Line Item` prepchartitem {
attributes {
name
}
relationships {
forPrepChartItem
}
public getSpecificInstances `get` `Prep Chart Line Item 1` returns pp1
public getSpecificInstances `get` `My Line Items` returns [ pp1 pp2 pp3 ]
instances {
{
name "Prep Chart Line Item 1"
} pp1
`Prep Chart Line Item 2` pp2
}
constructors {
name
}
}
prepchart `Default Prep Chart`
{
items
{
pp1
pp2
new prepchartitem `Prep Chart Line Item 3` pp3
}
}
}