pool/web/yaamp/models/db_notificationsModel.php
Tanguy Pruvot dbdd50321e Add basic notify rules check
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...
2016-06-01 17:32:20 +02:00

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(
);
}
}