OrderShare.php 609 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. use Illuminate\Database\Eloquent\SoftDeletes;
  5. class OrderShare extends Model{
  6. use SoftDeletes;
  7. protected $connection = 'mysql';
  8. protected $table='order_share';
  9. protected $fillable=['order_no','store_id','user_id','address_id','self_receive','remark','account','op_id','op_name','address_id','total'];
  10. public function user()
  11. {
  12. return $this->belongsTo(UserW::class,'user_id');
  13. }
  14. public function address()
  15. {
  16. return $this->belongsTo(AddressW::class,'address_id')->withTrashed();
  17. }
  18. }