Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 3 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
PromptType | |
0.00% |
0 / 3 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
boot | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
promptSettings | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
promptExamples | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace App\Http\Models\Prompts; |
4 | |
5 | use Illuminate\Database\Eloquent\Factories\HasFactory; |
6 | use App\Http\Models\Moloquent; |
7 | |
8 | class PromptType extends Moloquent |
9 | { |
10 | use HasFactory; |
11 | |
12 | protected $table = 'prompt_type'; |
13 | |
14 | protected $fillable = [ |
15 | 'name', |
16 | 'feature', |
17 | 'prompt_setting_id', |
18 | 'instructions', |
19 | 'persona', |
20 | 'query', |
21 | 'mission', |
22 | 'is_active', |
23 | 'examples', |
24 | 'existent_content_instructions', |
25 | 'constraints', |
26 | 'instructions_prompt', |
27 | 'context', |
28 | 'prompt_tone_id', |
29 | 'include_hashtags_prompt', |
30 | 'exclude_hashtags_prompt', |
31 | 'include_emojis_prompt', |
32 | 'exclude_emojis_prompt', |
33 | ]; |
34 | |
35 | /** |
36 | * The attributes that should be hidden for arrays. |
37 | * |
38 | * @var array |
39 | */ |
40 | protected $hidden = []; |
41 | |
42 | /** |
43 | * The accessors to append to the model's array form. |
44 | * |
45 | * @var array |
46 | */ |
47 | protected $appends = []; |
48 | |
49 | /** |
50 | * The "booting" method of the model. |
51 | */ |
52 | protected static function boot(): void |
53 | { |
54 | parent::boot(); |
55 | } |
56 | |
57 | public function promptSettings() |
58 | { |
59 | return $this->belongsTo(PromptSettings::class, 'prompt_setting_id'); |
60 | } |
61 | |
62 | public function promptExamples() |
63 | { |
64 | return $this->hasMany(PromptExample::class, 'prompt_type_id'); |
65 | } |
66 | } |