models.server.Tag Class
Ticket tags.
Tags with a status: are handled as a special status tags.
Only one tag with the prefix can be active at once.
Item Index
Methods
Methods
createdAt
()
Date
Returns:
deletedAt
()
Date
Returns:
fetchOrCreate
-
identifier
Fetch or create a model uniquely identified by the columns defined in
the identifier
Parameters:
-
identifierObjectObject of table columns
Returns:
with the model instance
getStatus
()
String
Get status part of the tag if the tag is status tag
Returns:
hasVisibility
-
visibility -
models
Visibility assertion helper
Parameters:
-
visibilityString -
modelsArrayArray of models.server.Visibility models
Returns:
Boolean
isSame
-
other
Return true if the other object is built using the same constructor and they have the same id
Parameters:
-
otherBackbone.Model
Returns:
Boolean
isSoftDeleted
()
Boolean
Returns:
isStatusTag
()
Boolean
Returns true if the tag is a status tag
Returns:
softDelete
-
byUser
Set timestamp to deletedAt
Parameters:
-
byUsermodels.server.User | NumberThe user who deleted the model
Returns:
softDeleteStatusTagsFor
-
ticket -
byUser
Soft delete status tags for the given ticket
Parameters:
-
ticketmodels.server.Ticket | NumberModel object or table id
-
byUsermodels.server.User | NumberThe user who deleted the tags
Returns:
statusTagsFor
-
ticket
Fetch all status tags for the given ticket
Parameters:
-
ticketmodels.server.Ticket | NumberModel object or table id
Returns:
Collection of models.server.Tag models
uniqueId
()
String
Returns:
updatedAt
()
Date
Returns:
Properties
type
String
The database table name
Virtual database field. Use .get("type") to access it.
unique_id
String
Unique id between tables.
Virtual database field. Use .get("unique_id") to access it.
