WstOrderCall.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <?php
  2. namespace common\models;
  3. use common\components\MongoActiveRecord;
  4. use Yii;
  5. /**
  6. * This is the model class for collection "ar_wst_order_call".
  7. *
  8. * @property \MongoDB\BSON\ObjectID|string $_id
  9. * @property string $order_id
  10. * @property string $order_no
  11. * @property string $warehouse_id
  12. * @property string $delivery_method_name
  13. * @property string $addon_service_name
  14. * @property string $country
  15. * @property string $state
  16. * @property string $city
  17. * @property string $post_code
  18. * @property string $address
  19. * @property string $consignee
  20. * @property string $telephone
  21. * @property string $comment
  22. * @property string $products
  23. */
  24. class WstOrderCall extends MongoActiveRecord
  25. {
  26. /**
  27. * {@inheritdoc}
  28. */
  29. public static function collectionName()
  30. {
  31. return 'ar_wst_order_call';
  32. }
  33. /**
  34. * @return \yii\mongodb\Connection the MongoDB connection used by this AR class.
  35. * @throws \yii\base\InvalidConfigException
  36. */
  37. public static function getDb()
  38. {
  39. return Yii::$app->get('dbLog');
  40. }
  41. /**
  42. * 获取id
  43. * @return string
  44. */
  45. public function getId() {
  46. return (string) $this->_id;
  47. }
  48. /**
  49. * {@inheritdoc}
  50. */
  51. public function attributes()
  52. {
  53. return [
  54. '_id',
  55. 'order_id',
  56. 'order_no',
  57. 'warehouse_id',
  58. 'delivery_method_name',
  59. 'addon_service_name',
  60. 'country',
  61. 'state',
  62. 'city',
  63. 'post_code',
  64. 'address',
  65. 'consignee',
  66. 'telephone',
  67. 'comment',
  68. 'products',
  69. ];
  70. }
  71. /**
  72. * {@inheritdoc}
  73. */
  74. public function attributeLabels()
  75. {
  76. return [
  77. '_id' => 'objectID',
  78. 'order_id',
  79. 'order_no',
  80. 'warehouse_id',
  81. 'delivery_method_name',
  82. 'addon_service_name',
  83. 'country',
  84. 'state',
  85. 'city',
  86. 'post_code',
  87. 'address',
  88. 'consignee',
  89. 'telephone',
  90. 'comment',
  91. 'products',
  92. ];
  93. }
  94. }