Skip to content

Commit

Permalink
added Monat constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
imbilalbutt committed Jan 24, 2024
1 parent 249d40b commit ceef412
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion exercises/exercise4.jv
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pipeline TemperaturePipeline {
"Geraet" oftype validGeraet,
"Hersteller" oftype text,
"Model" oftype text,
"Monat" oftype integer,
"Monat" oftype ValidMonat,
"Temperatur" oftype decimal,
"Batterietemperatur" oftype decimal,
"Geraet aktiv" oftype geraetStatus
Expand Down Expand Up @@ -96,6 +96,19 @@ pipeline TemperaturePipeline {
];
}

valuetype ValidMonat oftype integer {
constraints: [
ValidMonatConstraint,
];
}

constraint ValidMonatConstraint oftype RangeConstraint {
lowerBound: 0;
lowerBoundInclusive: true;
upperBound: 12;
upperBoundInclusive: true;
}

constraint geraetStatusList on text:
value in [
"Ja", "Nein"
Expand Down

0 comments on commit ceef412

Please sign in to comment.