mein-sterntours/app/Models/DraftType.php
2018-10-29 09:15:36 +01:00

37 lines
No EOL
1.2 KiB
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* App\Models\DraftType
*
* @property int $id
* @property string $name
* @property int $active
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\DraftType whereActive($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\DraftType whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\DraftType whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\DraftType whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\DraftType whereUpdatedAt($value)
* @mixin \Eloquent
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\DraftItem[] $draft_items
*/
class DraftType extends Model
{
protected $connection = 'mysql';
protected $table = 'draft_types';
protected $fillable = [
'name', 'active',
];
public function draft_items()
{
return $this->hasMany('App\Models\DraftItem', 'draft_type_id', 'id');
}
}