GCMNotification¶
Qualified name: intranet.apps.notifications.models.GCMNotification
- class intranet.apps.notifications.models.GCMNotification(id, multicast_id, num_success, num_failure, sent_data, time, user)[source]¶
Bases:
Model
- Parameters:
id (AutoField) – Primary key: ID
multicast_id (CharField) – Multicast id
num_success (IntegerField) – Num success
num_failure (IntegerField) – Num failure
sent_data (CharField) – Sent data
time (DateTimeField) – Time
Relationship fields:
- Parameters:
user (
ForeignKey
toUser
) – User (related name:gcmnotification
)sent_to (
ManyToManyField
toNotificationConfig
) – Sent to (related name:gcmnotification
)
Methods
get_next_by_time
Finds next instance based on
time
.get_previous_by_time
Finds previous instance based on
time
.Attributes
data
id
Type:
AutoField
multicast_id
Type:
CharField
num_failure
Type:
IntegerField
num_success
Type:
IntegerField
objects
sent_data
Type:
CharField
sent_to
Type:
ManyToManyField
toNotificationConfig
time
Type:
DateTimeField
user
Type:
ForeignKey
toUser
user_id
Internal field, use
user
instead.