feat:인터뷰 시나리오 마이그레이션/모델 추가
- 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>
This commit is contained in:
57
app/Models/Interview/InterviewSession.php
Normal file
57
app/Models/Interview/InterviewSession.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?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 InterviewSession extends Model
|
||||
{
|
||||
use Auditable, BelongsToTenant, ModelTrait, SoftDeletes;
|
||||
|
||||
protected $fillable = [
|
||||
'tenant_id',
|
||||
'interview_category_id',
|
||||
'interviewer_id',
|
||||
'interviewee_name',
|
||||
'interviewee_company',
|
||||
'interview_date',
|
||||
'status',
|
||||
'total_questions',
|
||||
'answered_questions',
|
||||
'memo',
|
||||
'completed_at',
|
||||
'created_by',
|
||||
'updated_by',
|
||||
'deleted_by',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'interview_date' => 'date',
|
||||
'completed_at' => 'datetime',
|
||||
'total_questions' => 'integer',
|
||||
'answered_questions' => 'integer',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'deleted_at',
|
||||
];
|
||||
|
||||
public function category()
|
||||
{
|
||||
return $this->belongsTo(InterviewCategory::class, 'interview_category_id');
|
||||
}
|
||||
|
||||
public function interviewer()
|
||||
{
|
||||
return $this->belongsTo(\App\Models\User::class, 'interviewer_id');
|
||||
}
|
||||
|
||||
public function answers()
|
||||
{
|
||||
return $this->hasMany(InterviewAnswer::class, 'interview_session_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user