models.server.Email Class
Item Index
Methods
Methods
_parseRecipient
()
Object
Returns:
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
getBody
()
String
Returns:
getEmailSecret
()
String
Returns:
getFiles
()
Array
Returns:
Array of file objects for Comment#addExistingAttachment
getSenderEmail
()
String
Returns:
getSenderName
()
String
Returns:
getState
()
String
Get state of the email
Returns:
getSubject
()
String
Returns:
getTicketId
()
Number
The ticket id for which this email is a response to
Returns:
hasVisibility
-
visibility -
models
Visibility assertion helper
Parameters:
-
visibilityString -
modelsArrayArray of models.server.Visibility models
Returns:
Boolean
isReply
()
Return true if this email is a reply to existing ticket
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:
softDelete
-
byUser
Set timestamp to deletedAt
Parameters:
-
byUsermodels.server.User | NumberThe user who deleted the model
Returns:
submitAsNewTicket
()
Bluebird.Promise
Create new ticket from this email
Returns:
with the new models.server.Ticket
submitAsReply
-
ticket
Submit this ticket as reply to given ticket
Parameters:
-
ticketmodels.server.Ticket
Returns:
with models.server.Comment
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.
