CartBills.php 1.96 KB
<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%cart_bills}}".
 *
 * @property string $id
 * @property string $account_id
 * @property string $manager_id
 * @property string $office_id
 * @property string $status
 * @property string $f1
 * @property string $f2
 * @property string $f3
 * @property string $message
 * @property integer $safe_bill
 * @property string $delivery
 * @property double $delivery_price
 * @property string $timestamp
 */
class CartBills extends \backend\components\base\BaseActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%cart_bills}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['account_id', 'office_id', 'f1', 'f2', 'f3', 'message', 'delivery'], 'required'],
            [['account_id', 'manager_id', 'office_id', 'status', 'safe_bill'], 'integer'],
            [['message'], 'string'],
            [['delivery_price'], 'number'],
            [['timestamp'], 'safe'],
            [['f1', 'f3'], 'string', 'max' => 150],
            [['f2'], 'string', 'max' => 50],
            [['delivery'], 'string', 'max' => 100]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'account_id' => Yii::t('app', 'Account ID'),
            'manager_id' => Yii::t('app', 'Manager ID'),
            'office_id' => Yii::t('app', 'Office ID'),
            'status' => Yii::t('app', 'Status'),
            'f1' => Yii::t('app', 'F1'),
            'f2' => Yii::t('app', 'F2'),
            'f3' => Yii::t('app', 'F3'),
            'message' => Yii::t('app', 'Message'),
            'safe_bill' => Yii::t('app', 'Safe Bill'),
            'delivery' => Yii::t('app', 'Delivery'),
            'delivery_price' => Yii::t('app', 'Delivery Price'),
            'timestamp' => Yii::t('app', 'Timestamp'),
        ];
    }
}