Add email, sms and push totals to topic
This commit is contained in:
parent
5f06c1ac5c
commit
e462e916f0
2 changed files with 37 additions and 3 deletions
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
])
|
||||
|
|
Loading…
Reference in a new issue