forked from a1gard/xshop
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
2.0 KiB
PHP
48 lines
2.0 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
/**
|
|
* App\Models\Discount
|
|
*
|
|
* @property int $id
|
|
* @property int $product_id
|
|
* @property int $amount
|
|
* @property string $type
|
|
* @property string $code
|
|
* @property string|null $expire
|
|
* @property \Illuminate\Support\Carbon|null $created_at
|
|
* @property \Illuminate\Support\Carbon|null $updated_at
|
|
* @property-read \App\Models\Product $product
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Discount newModelQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Discount newQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Discount query()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Discount whereAmount($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Discount whereCode($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Discount whereCreatedAt($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Discount whereExpire($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Discount whereId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Discount whereProductId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Discount whereType($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Discount whereUpdatedAt($value)
|
|
* @mixin \Eloquent
|
|
* @property \Illuminate\Support\Carbon|null $deleted_at
|
|
* @method static \Illuminate\Database\Query\Builder|Discount onlyTrashed()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Discount whereDeletedAt($value)
|
|
* @method static \Illuminate\Database\Query\Builder|Discount withTrashed()
|
|
* @method static \Illuminate\Database\Query\Builder|Discount withoutTrashed()
|
|
*/
|
|
class Discount extends Model
|
|
{
|
|
use HasFactory,SoftDeletes;
|
|
protected $dates = ['created_at','updated_at','expire'];
|
|
|
|
public function product(){
|
|
return $this->belongsTo(Product::class);
|
|
}
|
|
}
|