58 lines
1.8 KiB
PHP
58 lines
1.8 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Created by Reliese Model.
|
|
*/
|
|
|
|
namespace App\Models;
|
|
|
|
use Carbon\Carbon;
|
|
use Illuminate\Database\Eloquent\Collection;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* Class EmailTemplateDir
|
|
*
|
|
* @property int $id
|
|
* @property string $name
|
|
* @property string $color
|
|
* @property bool $active
|
|
* @property int $pos
|
|
* @property Carbon $created_at
|
|
* @property Carbon $updated_at
|
|
* @property Collection|EmailTemplate[] $email_templates
|
|
* @package App\Models
|
|
* @property-read int|null $email_templates_count
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplateDir newModelQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplateDir newQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplateDir query()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplateDir whereActive($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplateDir whereColor($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplateDir whereCreatedAt($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplateDir whereId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplateDir whereName($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplateDir wherePos($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplateDir whereUpdatedAt($value)
|
|
* @mixin \Eloquent
|
|
*/
|
|
class EmailTemplateDir extends Model
|
|
{
|
|
protected $table = 'email_template_dirs';
|
|
|
|
protected $casts = [
|
|
'active' => 'bool',
|
|
'pos' => 'int'
|
|
];
|
|
|
|
protected $fillable = [
|
|
'name',
|
|
'color',
|
|
'active',
|
|
'pos'
|
|
];
|
|
|
|
public function email_templates()
|
|
{
|
|
return $this->hasMany(EmailTemplate::class);
|
|
}
|
|
}
|