ApproachOrderCall.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. namespace common\models;
  3. use common\components\MongoActiveRecord;
  4. use Yii;
  5. /**
  6. * This is the model class for collection "ar_approach_order_call".
  7. *
  8. * @property \MongoDB\BSON\ObjectID|string $_id
  9. * @property string $sn 订单号
  10. * @property string $reference 支付唯一凭证
  11. * @property mixed $event 事件
  12. * @property mixed $data 回调内容
  13. */
  14. class ApproachOrderCall extends MongoActiveRecord
  15. {
  16. /**
  17. * {@inheritdoc}
  18. */
  19. public static function collectionName()
  20. {
  21. return 'ar_approach_order_call';
  22. }
  23. /**
  24. * @return \yii\mongodb\Connection the MongoDB connection used by this AR class.
  25. */
  26. public static function getDb()
  27. {
  28. return Yii::$app->get('dbLog');
  29. }
  30. /**
  31. * 获取id
  32. * @return string
  33. */
  34. public function getId() {
  35. return (string) $this->_id;
  36. }
  37. /**
  38. * {@inheritdoc}
  39. */
  40. public function attributes()
  41. {
  42. return [
  43. '_id',
  44. 'sn',
  45. 'reference',
  46. 'event',
  47. 'data',
  48. ];
  49. }
  50. /**
  51. * {@inheritdoc}
  52. */
  53. public function attributeLabels()
  54. {
  55. return [
  56. '_id' => 'objectID',
  57. 'sn' => 'orderSn',
  58. 'reference' => 'reference',
  59. 'event' => 'event',
  60. 'data' => 'data',
  61. ];
  62. }
  63. }