| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <?php
- namespace addons\QiShangTong\common\models;
- use common\models\mall\Mall;
- use common\models\order\Order;
- use Yii;
- /**
- * This is the model class for table "qimall_addons_qi_shang_tong_order".
- *
- * @property int $id ID
- * @property int $mall_id 商城ID
- * @property int $created_at 创建时间
- * @property int $updated_at 更新时间
- * @property int $status 状态
- * @property int $order_id 订单ID
- * @property int $order_status 订单ID
- * @property int $is_logistics 订单ID
- * @property int $user_id 订单ID
- * @property string $order_no 订单编号
- * @property string|null $last_resp 订单编号
- * @property string $third_order_no 第三方订单编号
- * @property array|null $content 最后一次更新数据
- * @property array|null $post 请求数据
- * @property array|null $order_detail_ids 订单详情ID
- * @property int $req_success 订单详情ID
- * @property string $last_req 订单编号
- */
- class QiShangTongOrder extends \common\models\base\BaseActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return 'qimall_addons_qi_shang_tong_order';
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['mall_id', 'created_at', 'updated_at', 'status', 'order_id', 'order_status', 'is_logistics', 'user_id', 'req_success'], 'integer'],
- [['content', 'post', 'order_detail_ids'], 'safe'],
- [['order_no'], 'string', 'max' => 30],
- [['third_order_no'], 'string', 'max' => 50],
- [['last_req'], 'string', 'max' => 255],
- [['last_resp'], 'string']
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'mall_id' => 'Mall ID',
- 'created_at' => 'Created At',
- 'updated_at' => 'Updated At',
- 'status' => 'Status',
- 'order_id' => 'Order ID',
- 'order_no' => 'Order No',
- 'third_order_no' => 'Third Order No',
- 'content' => 'Content',
- 'post' => 'Post',
- 'order_detail_ids' => 'Order Detail Ids',
- ];
- }
- public function getOrder()
- {
- return $this->hasOne(Order::class, ['id' => 'order_id']);
- }
- public function getMall()
- {
- return $this->hasOne(Mall::class, ['id' => 'mall_id']);
- }
- }
|