- interview_categories, interview_templates, interview_questions 테이블 생성 - interview_sessions, interview_answers 테이블 생성 - InterviewCategory, InterviewTemplate, InterviewQuestion 모델 추가 - InterviewSession, InterviewAnswer 모델 추가 - 멀티테넌트(tenant_id) 지원, 감사 로깅(Auditable) 적용 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
45 lines
930 B
PHP
45 lines
930 B
PHP
<?php
|
|
|
|
namespace App\Models\Interview;
|
|
|
|
use App\Traits\Auditable;
|
|
use App\Traits\BelongsToTenant;
|
|
use App\Traits\ModelTrait;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class InterviewCategory extends Model
|
|
{
|
|
use Auditable, BelongsToTenant, ModelTrait, SoftDeletes;
|
|
|
|
protected $fillable = [
|
|
'tenant_id',
|
|
'name',
|
|
'description',
|
|
'sort_order',
|
|
'is_active',
|
|
'created_by',
|
|
'updated_by',
|
|
'deleted_by',
|
|
];
|
|
|
|
protected $casts = [
|
|
'is_active' => 'boolean',
|
|
'sort_order' => 'integer',
|
|
];
|
|
|
|
protected $hidden = [
|
|
'deleted_at',
|
|
];
|
|
|
|
public function templates()
|
|
{
|
|
return $this->hasMany(InterviewTemplate::class, 'interview_category_id');
|
|
}
|
|
|
|
public function sessions()
|
|
{
|
|
return $this->hasMany(InterviewSession::class, 'interview_category_id');
|
|
}
|
|
}
|