feat:인터뷰 시나리오 관리 기능 추가
- InterviewScenarioController: 카테고리/항목/질문 CRUD + 세션 관리 API - InterviewScenarioService: 비즈니스 로직 (트리 조회, 세션 시작/토글/완료) - MNG 모델 5개: InterviewCategory, InterviewTemplate, InterviewQuestion, InterviewSession, InterviewAnswer - React 뷰: 2-패널 레이아웃 (카테고리 사이드바 + 항목/질문 관리) - 인터뷰 실시 모달: 카테고리 선택 → 체크리스트 → 완료 - 인터뷰 기록 모달: 기록 목록 + 상세 보기 - InterviewMenuSeeder: 영업관리 > 인터뷰 시나리오 메뉴 추가 - 라우트 18개 추가 (sales/interviews/api/*) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
52
app/Models/Interview/InterviewSession.php
Normal file
52
app/Models/Interview/InterviewSession.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Interview;
|
||||
|
||||
use App\Traits\BelongsToTenant;
|
||||
use App\Traits\ModelTrait;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class InterviewSession extends Model
|
||||
{
|
||||
use 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',
|
||||
];
|
||||
|
||||
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