Commit cadb8eaa authored by François Ferry's avatar François Ferry
Browse files

feat(schema): add schema

close: #1
parent e63b18b540c7
......@@ -16,3 +16,23 @@
# along with this program. If not, see <>.
"""cubicweb-tuto schema"""
from yams.buildobjs import EntityType, String, Float, SubjectRelation, Int
class Museum(EntityType):
name = String()
latitude = Float()
longitude = Float()
is_in = SubjectRelation("City", cardinality="1*")
director = SubjectRelation("Person", cardinality="**")
postal_address = String()
class City(EntityType):
name = String()
zip_code = Int()
class Person(EntityType):
name = String()
email = String()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment