<?php

namespace app\models;

use yii\db\ActiveRecord;

class Tariff extends ActiveRecord
{
    public static function tableName()
    {
        return '{{%tariff}}';
    }

    public function rules()
    {
        return [
            [['service_type', 'price'], 'required'],
            [['price'], 'number', 'min' => 0],
            ['service_type', 'unique'],
        ];
    }

    public function attributeLabels()
    {
        return [
            'service_type' => 'Тип услуги',
            'price' => 'Тариф',
            'description' => 'Описание',
        ];
    }
}