1
0
Fork 0
mirror of synced 2024-07-02 05:00:33 +12:00

Add email, sms and push totals to topic

This commit is contained in:
Jake Barnby 2024-02-15 17:22:43 +13:00
parent 5f06c1ac5c
commit e462e916f0
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C
2 changed files with 37 additions and 3 deletions

View file

@ -1903,7 +1903,29 @@ $commonCollections = [
'filters' => [],
],
[
'$id' => ID::custom('total'),
'$id' => ID::custom('emailTotal'),
'type' => Database::VAR_INTEGER,
'format' => '',
'size' => 0,
'signed' => true,
'required' => false,
'default' => 0,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('smsTotal'),
'type' => Database::VAR_INTEGER,
'format' => '',
'size' => 0,
'signed' => true,
'required' => false,
'default' => 0,
'array' => false,
'filters' => [],
],
[
'$id' => ID::custom('pushTotal'),
'type' => Database::VAR_INTEGER,
'format' => '',
'size' => 0,

View file

@ -34,9 +34,21 @@ class Topic extends Model
'default' => '',
'example' => 'events',
])
->addRule('total', [
->addRule('emailTotal', [
'type' => self::TYPE_INTEGER,
'description' => 'Total count of subscribers subscribed to topic.',
'description' => 'Total count of email subscribers subscribed to the topic.',
'default' => 0,
'example' => 100,
])
->addRule('smsTotal', [
'type' => self::TYPE_INTEGER,
'description' => 'Total count of SMS subscribers subscribed to the topic.',
'default' => 0,
'example' => 100,
])
->addRule('pushTotal', [
'type' => self::TYPE_INTEGER,
'description' => 'Total count of push subscribers subscribed to the topic.',
'default' => 0,
'example' => 100,
])