Your IP : 216.73.216.79


Current Path : /var/www/html/agc/backend/modules/contentPoll/models/
Upload File :
Current File : /var/www/html/agc/backend/modules/contentPoll/models/ContentPollVote.php

<?php

namespace backend\modules\contentPoll\models;

use Yii;

/**
 * This is the model class for table "content_poll_vote".
 *
 * @property int $id
 * @property int $poll_id
 * @property string $user_answer
 * @property string $submit_at
 */
class ContentPollVote extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'content_poll_vote';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['poll_id', 'user_answer', 'submit_at'], 'required'],
            [['poll_id'], 'integer'],
            [['submit_at'], 'safe'],
            [['user_answer'], 'string', 'max' => 255],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'poll_id' => Yii::t('app', 'Poll ID'),
            'user_answer' => Yii::t('app', 'User Answer'),
            'submit_at' => Yii::t('app', 'Submit At'),
        ];
    }
}