OrderCommodityModel.php 339 B

1234567891011121314151617
  1. <?php
  2. namespace app\api\model;
  3. use think\Model;
  4. class OrderCommodityModel extends Model
  5. {
  6. protected $name = 'order_commodity';
  7. public function order()
  8. {
  9. return $this->belongsTo('order','o_id','o_id');
  10. }
  11. public function Commodity()
  12. {
  13. return $this->belongsTo('CommodityModel','c_id','c_id');
  14. }
  15. }