mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-09-20 18:09:54 +00:00
sample db rule which mail the admin: enabled, description, conditiontype, conditionvalue, notifytype 1, 'DCR Greater than X', 'price >', 0.0035, 'email' see core/backend/notify.php for more details...
36 lines
548 B
PHP
36 lines
548 B
PHP
<?php
|
|
|
|
class db_notifications extends CActiveRecord
|
|
{
|
|
public static function model($className=__CLASS__)
|
|
{
|
|
return parent::model($className);
|
|
}
|
|
|
|
public function tableName()
|
|
{
|
|
return 'notifications';
|
|
}
|
|
|
|
public function rules()
|
|
{
|
|
return array(
|
|
array('idcoin', 'required'),
|
|
array('enabled', 'numerical', 'integerOnly'=>true),
|
|
);
|
|
}
|
|
|
|
public function relations()
|
|
{
|
|
return array(
|
|
'coin' => array(self::BELONGS_TO, 'db_coins', 'idcoin', 'alias'=>'nc'),
|
|
);
|
|
}
|
|
|
|
public function attributeLabels()
|
|
{
|
|
return array(
|
|
);
|
|
}
|
|
}
|
|
|