ActivityApplyRecord.php 629 Bytes
<?php

namespace App\Models;

use App\Support\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class ActivityApplyRecord extends Model
{
    protected $table = 'activity_apply_records';

    protected $guarded = [];

    protected $casts = [
        'current' => 'json'
    ];


    /**
     * @return BelongsTo
     */
    public function activity(): BelongsTo
    {
        return $this->belongsTo(Activity::class)->withTrashed();
    }

    /**
     * @return BelongsTo
     */
    public function auditUser(): BelongsTo
    {
        return $this->belongsTo(User::class, 'audit_user_id')->withTrashed();
    }
}