<?php

namespace common\models;

use common\components\MongoActiveRecord;
use Yii;

/**
 * This is the model class for collection "ar_wst_order_call".
 *
 * @property \MongoDB\BSON\ObjectID|string $_id
 * @property string $order_id
 * @property string $order_no
 * @property string $warehouse_id
 * @property string $delivery_method_name
 * @property string $addon_service_name
 * @property string $country
 * @property string $state
 * @property string $city
 * @property string $post_code
 * @property string $address
 * @property string $consignee
 * @property string $telephone
 * @property string $comment
 * @property string $products
 */
class WstOrderCall extends MongoActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function collectionName()
    {
        return 'ar_wst_order_call';
    }

    /**
     * @return \yii\mongodb\Connection the MongoDB connection used by this AR class.
     * @throws \yii\base\InvalidConfigException
     */
    public static function getDb()
    {
        return Yii::$app->get('dbLog');
    }

    /**
     * 获取id
     * @return string
     */
    public function getId() {
        return (string) $this->_id;
    }
    /**
     * {@inheritdoc}
     */
    public function attributes()
    {
        return [
            '_id',
            'order_id',
            'order_no',
            'warehouse_id',
            'delivery_method_name',
            'addon_service_name',
            'country',
            'state',
            'city',
            'post_code',
            'address',
            'consignee',
            'telephone',
            'comment',
            'products',
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            '_id' => 'objectID',
            'order_id',
            'order_no',
            'warehouse_id',
            'delivery_method_name',
            'addon_service_name',
            'country',
            'state',
            'city',
            'post_code',
            'address',
            'consignee',
            'telephone',
            'comment',
            'products',
        ];
    }

}
