Skip to content

Instantly share code, notes, and snippets.

@dynamicguy
Created July 16, 2017 08:39
Show Gist options
  • Save dynamicguy/1c2812c2f819101aeae07fb4897ee359 to your computer and use it in GitHub Desktop.
Save dynamicguy/1c2812c2f819101aeae07fb4897ee359 to your computer and use it in GitHub Desktop.
test data model
entity Region {
name String required,
continent String
}
entity Country {
code String required maxlength(3),
name String required,
surfaceArea Float,
indepYear Long,
population Long,
lifeExpectancy Float,
gnp Float,
gnpOld Float,
localName String,
governmentForm String,
headOfState String,
isoCode2 String maxlength(2),
callingCode Long,
capital Long
}
entity City {
name String required,
division String,
description String,
population Long
}
entity Location {
streetAddress String required,
streetAddressLine2 String,
/**
* Also known as zip
*/
postalCode String,
/**
* Also known as state
*/
stateProvince String,
lat Float,
lon Float
}
relationship ManyToOne {
Country{region(name)} to Region
}
relationship ManyToOne {
Location{city(name)} to City
}
relationship ManyToOne {
City{country(name)} to Country
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment