...
At a high level, the basic syntax to define C3.ai Type is as follows (originally from official C3.ai Type documentation here: https://developer.c3.ai/docs/7.12.17/topic/mda-types
...
[remix,
...
extendable]
...
[entity]
...
type
...
TypeName
...
extends,
...
mixes
...
AnotherType]
...
{
...
/*
...
comments
...
*/
...
[field
...
declaration]
...
[method
...
declaration]
...
}
Everything within square brackets '[]' is optional.
...
Like many other programming languages, the C3 AI Suite has primitive fields (e.g., int, boolean, byte, double, datetime, string, longstring). Primitive fields are stored in a particular C3.ai type's database table.
doubleField: double
intField: int
Reference Fields
Reference fields point (or refer) to other C3.ai Types. Reference fields link (or join) two C3.ai Types together. Under the covers, the Reference field stores a pointer (i.e., foreign key reference or ID) to record of another C3.ai Type. To define a Reference field, use the following syntax: field name, followed by colon ':', followed by Type Name (e.g., "building: Building").
refField: AnotherType
Collection Fields
Collection Fields contain a list of values or records. There are four categories of collections fields:
...