地
Full schema preview
Abstract object types
Place
為一抽象概念的abstract object type
,只有一個必填的name
property
。其有一個delegated constraint exclusive
的constraint
,這與constraint exclusive
不同。如果加上delegated
,代表exclusive
是會施加在後續各個extending
Place
的object type
上。
舉例來說,假如Landmark
和Location
都extending
Place
,而我們想生成一個名叫有間客棧
的object
。
-
使用
delegated constraint exclusive
,可以讓我們同時生成一個name
為有間客棧
的Landmark
及一個name
為有間客棧
的Location
。 -
使用
constraint exclusive
,只能生成一個name
為有間客棧
的Landmark
或一個name
為有間客棧
的Location
。
Place
Object types
Landmark
Landmark
用來代表知名度較高的地標。
Location
Location
用來代表一般地點。
Store
Store
用來代表店鋪。