1234567891011121314151617181920212223 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Database\Eloquent\SoftDeletes;
- class OrderRefundW extends Model
- {
- use SoftDeletes;
- protected $connection = 'mysql_w';
- protected $table='order_refund';
- protected $guarded=[];
- public function store(){
- return $this->HasOne(Store::class,'id','store_id');
- }
- public function user(){
- return $this->HasOne(UserW::class,'id','user_id');
- }
- public function getAccountAttribute($value){
- return round($value);
- }
- }
|