| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Factories\HasFactory;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Database\Eloquent\Relations\BelongsTo;
- use Illuminate\Database\Eloquent\SoftDeletes;
- /**
- * @property int $id
- * @property int $unit_id
- * @property string $title
- * @property string|null $content
- * @property bool $visible_to_franchisee
- * @property \Carbon\Carbon $created_at
- * @property \Carbon\Carbon $updated_at
- * @property \Carbon\Carbon|null $deleted_at
- * @property-read \App\Models\Unit $unit
- */
- class UnitHistory extends Model
- {
- use HasFactory, SoftDeletes;
- protected $table = 'unit_histories';
- protected $guarded = ['id'];
- protected $casts = [
- 'visible_to_franchisee' => 'boolean',
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'deleted_at' => 'datetime',
- ];
- public function unit(): BelongsTo
- {
- return $this->belongsTo(Unit::class, 'unit_id');
- }
- }
|