Object initialization, setting all the default values.
Optional
newData: anythe data to load, optional
Optional
options: anycustom options to apply; they will depend on the child resource
Usually, there is no need to implement the constructor; implicitly, it will call the load
of the child resource
and therefore loading all the resources with default values.
If needed, this is the suggested implementation:
super();
this.load(x);
// ...
The id (IUID) of the calendar.
An identifying color for the calendar; e.g. #0010AA
.
Optional
createdIn case of shared calendar, the id of the user who created it.
The description of the calendar. Max 300 characters.
Optional
externalExtra info about the calendar, if linked to an external service.
The name of the calendar. Max 100 characters.
Optional
teamThe id of the teamId owning the calendar, in case of team calendar (this cannot be changed).
A default timezone for the calendar.
Optional
userThe id of the user owning the calendar, in case of private calendar (this cannot be changed).
If teamId
is set, this attribute is ignored.
Optional
usersIn case of shared calendar, the IDs of the users that can manage the calendar's appointments.
If null
, everyone can manage the calendar's appointments; if empty ([]
), no one can (read-only).
Return an attribute in a cleaned standard that force-cast the element.
the origin attribute, to cast
the cast function, e.g. Boolean
, Number
, String
, x => new CustomClass(x)
, etc.
Optional
defaultVal: anyif set, the fallback value instead of null
cleaned attribute
Return an array in a cleaned standard that force-cast each element, keeping only the valid ones.
the origin array, to cast and check
the cast function, e.g. x => String(x)
or x => new CustomClass(x)
Optional
defaultVal: anyif set, the fallback value instead of null
cleaned array
Shortcut to Utils.isEmpty to check the emptiness of a field.
Optional
type: isEmptyFieldTypesLoad the attributes from an already existing resource and then force some attributes to assume safeData values. The function is usually used in the back-end to mix together db data with new data, without the risk of changing ids and other attributes which are managed in appositely curated scenario.
the data to load
the attributes to force to specific values
Representation of a calendar, which can be:
Table:
idea_calendars
.Indexes: