Defines an enum
primitive concept model. An enum
is an enumeration of a fixed set of possible values, as symbols. Use this when it makes sense to list all the possible values in advance. For more information, see Modeling Concepts.
You are limited to 512 symbols for each enum.
You also cannot add a symbol
when you create a concept that is a role-of
an enum. Additionally, while you can extend an enum, you cannot add additional symbols to the extended enum concept. You should consider whether you actually need to extend or use role-of
before applying it to an enum, or if using the original concept works best.
This top-level key and its child keys must be defined in a *.model.bxb
file. The file must be in the models/concepts
folder.
enum (Planet) {
description (The resort's affiliated planetary system (include the planet and its moons). Since the list and vocab is exhaustive, we can use an enum.)
symbol (Mercury)
symbol (Venus)
symbol (Earth)
symbol (Mars)
symbol (Jupiter)
symbol (Saturn)
symbol (Uranus)
symbol (Neptune)
symbol (Pluto)
}
description optional | Adds text describing the primitive concept, which is useful in describing how a primitive can be used |
equivalence optional | A primitive equivalence policy specifies how the system should compare two instances of the same concept |
extends optional | Extends a parent enum concept with a new child concept, which inherits all of the parent properties |
features optional | Marks a concept with special concept features for user preferences, privacy, or security |
named-consumer optional | Named consumers allow explicitly linking a concept to an action |
role-of optional | There are cases where you want to assign a specific role to a feature, but not extend the feature |
symbol optional | When declaring an Enum primitive, you can use symbol declarations to specify the possible values |