<?php

namespace common\modules\triggers\models;

use Yii;

/**
 * This is the model class for table "trigger_schedule".
 *
 * @property integer $id
 * @property integer $sended
 * @property integer $checked
 * @property integer $message_id
 * @property string $message
 * @property string $email
 * @property string $time
 * @property string $date_create
 * @property integer $list_id
 * @property integer $campaign_id
 */
class TriggerSchedule extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'trigger_schedule';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['sended', 'checked', /*'message_id',*/ 'list_id', 'campaign_id'], 'integer'],
            [['message', 'email'], 'required'],
            [['message'], 'string'],
            [['time', 'date_create'], 'safe'],
            [['email'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'sended' => 'Sended',
            'checked' => 'Checked',
            'message_id' => 'Message ID',
            'message' => 'Message',
            'email' => 'Email',
            'time' => 'Time',
            'date_create' => 'Date Create',
            'list_id' => 'List ID',
            'campaign_id' => 'Campaign ID',
        ];
    }
}
