RoomCoupon.php 1.16 KB
<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%room_coupon}}".
 *
 * @property integer $room_id
 * @property string $code
 * @property string $banner_txt
 * @property string $help_title
 * @property string $help_txt
 */
class RoomCoupon extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%room_coupon}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['room_id'], 'required'],
            [['room_id', 'create_time', 'update_time'], 'integer'],
            [['banner_txt', 'help_txt'], 'string'],
            [['code'], 'string', 'max' => 50],
            [['help_title'], 'string', 'max' => 100],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'room_id' => 'Room ID',
            'code' => 'Code',
            'banner_txt' => 'Banner Txt',
            'help_title' => 'Help Title',
            'help_txt' => 'Help Txt',
            'create_time' => 'Create Time',
            'update_time' => 'Update Time',
        ];
    }
}