ldc-startcoq/app/Models/PromoDistributionNetwork.php

48 lines
909 B
PHP
Raw Permalink Normal View History

2023-02-22 11:51:36 +01:00
<?php
namespace App\Models;
2023-06-21 10:24:56 +00:00
use App\Enums\Promotions\DistributionNetworkEnum;
2023-02-23 16:23:00 +01:00
use Illuminate\Database\Eloquent\Factories\HasFactory;
2023-02-22 11:51:36 +01:00
use Illuminate\Database\Eloquent\Model;
/**
* @property integer $id
* @property boolean $name
* @property string $label
* @property string $created_at
* @property string $updated_at
* @property Promo[] $promos
*/
class PromoDistributionNetwork extends Model
{
2023-02-23 16:23:00 +01:00
use HasFactory;
2023-02-22 11:51:36 +01:00
/**
* @var array
*/
protected $fillable = [
'name',
'label',
'created_at',
'updated_at'
];
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
2023-06-21 10:24:56 +00:00
'name' => DistributionNetworkEnum::class
2023-02-22 11:51:36 +01:00
];
/**
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function promos()
{
return $this->hasMany('App\Models\Promo');
}
}