Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
RolePlayConversations
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 project
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 newFactory
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3namespace App\Http\Models;
4
5use Database\Factories\Http\Models\RolePlayConversationsFactory;
6use Illuminate\Database\Eloquent\Factories\HasFactory;
7
8/**
9 * @property string $user_id The user ID who owns this conversation
10 * @property string $project_id The roleplay project ID
11 * @property string|null $company_id The company ID
12 * @property string $status The conversation status (created, processing, done, failed)
13 * @property string|null $vapi_call_id The VAPI call ID
14 * @property string|null $transcript The conversation transcript
15 * @property int|null $duration The conversation duration in seconds
16 * @property float|null $score The total score
17 * @property array|null $feedback The feedback data
18 * @property array|null $score_llm The raw LLM score data
19 * @property array|null $vapi_response The raw VAPI response
20 * @property string|null $prompt The user prompt
21 */
22class RolePlayConversations extends Moloquent
23{
24    use HasFactory;
25
26    protected $table = 'role_play_conversations';
27
28    protected $fillable = [
29        'user_id',
30        'project_id',
31        'score',
32        'status',
33        'prompt',
34        'score_llm',
35        'vapi_response',
36        'duration',
37        'transcript',
38        'icp',
39        'agent',
40        'feedback',
41        'vapi_call_id',
42        'updated_at',
43        'created_at',
44    ];
45
46    public function project()
47    {
48        return $this->belongsTo(RolePlayProjects::class, 'project_id');
49    }
50
51    protected static function newFactory()
52    {
53        return RolePlayConversationsFactory::new();
54    }
55}