123456789101112131415161718192021222324 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Database\Eloquent\SoftDeletes;
- class OrderShareW extends Model{
- use SoftDeletes;
- protected $connection = 'mysql_w';
- protected $table='order_share';
- protected $fillable=['order_no','store_id','user_id','address_id','self_receive','remark','account','op_id','op_name','address_id','total'];
- public function user()
- {
- return $this->belongsTo(UserW::class,'user_id');
- }
- public function address()
- {
- return $this->belongsTo(AddressW::class,'address_id')->withTrashed();
- }
- }
|