*/ protected $fillable = [ 'user_id', 'title', 'company_name', 'company_address', 'company_whatsapp', 'company_website', 'company_social_media', 'company_business_activities', 'company_services_products', 'objective', 'context', 'persona', 'tone', 'constraints', 'output_format', 'examples', 'variables', 'temperature', 'max_tokens', 'provider_id', 'model_id', 'generated_prompt', 'status', ]; /** * Get the attributes that should be cast. * * @return array */ protected function casts(): array { return [ 'examples' => 'array', 'variables' => 'array', 'temperature' => 'decimal:2', ]; } /** * Get the user that owns the prompt project. * * @return \Illuminate\Database\Eloquent\Relations\BelongsTo<\App\Models\User, \App\Models\PromptProject> */ public function user(): BelongsTo { return $this->belongsTo(User::class); } /** * Get the AI provider for the prompt project. * * @return \Illuminate\Database\Eloquent\Relations\BelongsTo<\App\Models\AiProvider, \App\Models\PromptProject> */ public function provider(): BelongsTo { return $this->belongsTo(AiProvider::class); } /** * Get the AI model for the prompt project. * * @return \Illuminate\Database\Eloquent\Relations\BelongsTo<\App\Models\AiModel, \App\Models\PromptProject> */ public function model(): BelongsTo { return $this->belongsTo(AiModel::class); } /** * Get all of the generations for the prompt project. * * @return \Illuminate\Database\Eloquent\Relations\HasMany<\App\Models\PromptGeneration> */ public function generations(): HasMany { return $this->hasMany(PromptGeneration::class); } }