|
|
|
@ -0,0 +1,17 @@ |
|
|
|
<?php |
|
|
|
|
|
|
|
namespace App\Models; |
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory; |
|
|
|
use Illuminate\Database\Eloquent\SoftDeletes; |
|
|
|
|
|
|
|
class Order extends BaseModel |
|
|
|
{ |
|
|
|
use HasFactory, SoftDeletes; |
|
|
|
protected $guarded = ['created_at', 'updated_at']; //不可批量赋值的属性
|
|
|
|
|
|
|
|
public function product() |
|
|
|
{ |
|
|
|
return $this->belongsTo(Product::class); |
|
|
|
} |
|
|
|
} |