GoodsOrder.php 513 B

12345678910111213141516171819202122
  1. <?php
  2. namespace app\common\model;
  3. use think\Model;
  4. // 订单
  5. class GoodsOrder extends Model
  6. {
  7. protected $name='store_order';
  8. public function orderItem()
  9. {
  10. return $this->hasMany('GoodsOrderItem','order_id');
  11. }
  12. public function orderBill()
  13. {
  14. return $this->hasOne('OrderBill','order_id');
  15. }
  16. public function orderRefund(){
  17. return $this->hasOne('GoodsOrderRefund','order_id')->field('id,order_id,status,refund_type,refund_money,audit_desc,is_deleted');
  18. }
  19. }