models.client.Base Class
Base class for client models
Item Index
Methods
Properties
Methods
collection
-
[models] -
[options]
Create instance of models.client.Base.Collection with this model class
as the model property
Parameters:
-
[models]Array optionalArray of models.client.Base models
-
[options]Object optional
Returns:
collection
-
[models] -
[options]
Create instance of models.client.Base.Collection with this model class
as the model property
Parameters:
-
[models]Array optionalArray of models.client.Base models
-
[options]Object optional
Returns:
collection
-
[models] -
[options]
Create instance of models.client.Base.Collection with this model class
as the model property
Parameters:
-
[models]Array optionalArray of models.client.Base models
-
[options]Object optional
Returns:
createdAt
()
Date
Returns:
deletedAt
()
Date
Returns:
dispose
()
Call when not using this model anymore. Unbinds all event listeners.
dispose
()
Call when not using this model anymore. Unbinds all event listeners.
dispose
()
Call when not using this model anymore. Unbinds all event listeners.
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:
rel
-
key
Return relation data for given key or throw if it's not loaded
Parameters:
-
keyString
Returns:
Relation data
rel
-
key
Return relation data for given key or throw if it's not loaded
Parameters:
-
keyString
Returns:
Relation data
rel
-
key
Return relation data for given key or throw if it's not loaded
Parameters:
-
keyString
Returns:
Relation data
save
()
Bluebird.Promise
Save model to server http://backbonejs.org/#Model-save
Returns:
with the new saved model
save
()
Bluebird.Promise
Save model to server http://backbonejs.org/#Model-save
Returns:
with the new saved model
save
()
Bluebird.Promise
Save model to server http://backbonejs.org/#Model-save
Returns:
with the new saved model
uniqueId
()
String
Returns:
uniqueId
()
String
Returns:
uniqueId
()
String
Returns:
updatedAt
()
Date
Returns:
wasCreatedInVicinity
()
Boolean
Return true if the another model was created within 60 seconds of this one by the same user
Returns:
wasCreatedInVicinity
()
Boolean
Return true if the another model was created within 60 seconds of this one by the same user
Returns:
wasCreatedInVicinity
()
Boolean
Return true if the another model was created within 60 seconds of this one by the same user
Returns:
Properties
idAttribute
String
Use unique_id from models.server.Base as the model id. We need this to be able to put models of diffent type to a single Backbone collection http://backbonejs.org/#Model-idAttribute
idAttribute
String
Use unique_id from models.server.Base as the model id. We need this to be able to put models of diffent type to a single Backbone collection http://backbonejs.org/#Model-idAttribute
idAttribute
String
Use unique_id from models.server.Base as the model id. We need this to be able to put models of diffent type to a single Backbone collection http://backbonejs.org/#Model-idAttribute
saving
Bluebird.Promise | Null
Promise of the saving operation instantiated by Base#save(). Available only when the operation is ongoing.
saving
Bluebird.Promise | Null
Promise of the saving operation instantiated by Base#save(). Available only when the operation is ongoing.
saving
Bluebird.Promise | Null
Promise of the saving operation instantiated by Base#save(). Available only when the operation is ongoing.
