first commit
This commit is contained in:
36
app/Models/CouponOrder.php
Normal file
36
app/Models/CouponOrder.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class CouponOrder extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'brand_id',
|
||||
'quantity',
|
||||
'prefix'
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes excluded from the model's JSON form.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $hidden = [
|
||||
//
|
||||
];
|
||||
|
||||
public function coupons()
|
||||
{
|
||||
return $this->hasMany(Coupon::class, 'coupon_order_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user