Custom.php 1.3 KB
<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%custom}}".
 *
 * @property int $id
 * @property int $uid
 * @property string $name
 * @property string $mobile
 * @property string $model
 * @property string $color
 * @property string $remark 备注
 * @property int $created_at
 * @property int $updated_at
 */
class Custom extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%custom}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['uid', 'name', 'mobile', 'created_at',], 'required'],
            [['uid', 'created_at', 'updated_at'], 'integer'],
            [['remark', 'model', 'color'], 'string'],
            [['name'], 'string', 'max' => 255],
            [['mobile'], 'string', 'max' => 11],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => '序号',
            'uid' => '用户id',
            'name' => '姓名',
            'mobile' => '手机号',
            'remark' => '备注',
            'model' => '车型',
            'color' => '颜色',
            'created_at' => '申请时间',
            'updated_at' => '审核时间',
        ];
    }
}