Your IP : 216.73.216.79


Current Path : /var/www/html/eform/frontend/models/
Upload File :
Current File : /var/www/html/eform/frontend/models/Division.php

<?php

namespace frontend\models;

use Yii;

/**
 * This is the model class for table "Division".
 *
 * @property string $Code
 * @property string|null $Name
 */
class Division extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'Division';
    }

    /**
     * @return \yii\db\Connection the database connection used by this AR class.
     */
    public static function getDb()
    {
        return Yii::$app->get('bkrm');
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['Code'], 'required'],
            [['Code'], 'string', 'max' => 10],
            [['Name'], 'string', 'max' => 200],
            [['Code'], 'unique'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'Code' => 'Code',
            'Name' => 'Name',
        ];
    }
}