| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?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 \Illuminate\Support\Carbon|null $created_at
- * @property \Illuminate\Support\Carbon|null $updated_at
- * @property \Illuminate\Support\Carbon|null $deleted_at
- * @property-read \App\Models\Unit $unit
- * @method static \Illuminate\Database\Eloquent\Builder<static>|UnitHistory newModelQuery()
- * @method static \Illuminate\Database\Eloquent\Builder<static>|UnitHistory newQuery()
- * @method static \Illuminate\Database\Eloquent\Builder<static>|UnitHistory onlyTrashed()
- * @method static \Illuminate\Database\Eloquent\Builder<static>|UnitHistory query()
- * @method static \Illuminate\Database\Eloquent\Builder<static>|UnitHistory whereContent($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|UnitHistory whereCreatedAt($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|UnitHistory whereDeletedAt($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|UnitHistory whereId($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|UnitHistory whereTitle($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|UnitHistory whereUnitId($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|UnitHistory whereUpdatedAt($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|UnitHistory whereVisibleToFranchisee($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|UnitHistory withTrashed(bool $withTrashed = true)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|UnitHistory withoutTrashed()
- * @mixin \Eloquent
- */
- 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');
- }
- }
|