*/ protected $fillable = [ 'custom_subject_id', 'user_id', 'question', 'answer', 'provider', 'model', 'input_tokens', 'output_tokens', 'asked_at', ]; /** @var array */ protected $casts = [ 'asked_at' => 'datetime', ]; /** * Get the custom subject associated with this question. */ public function customSubject(): BelongsTo { return $this->belongsTo(CustomSubject::class); } /** * Get the user who asked this question. */ public function user(): BelongsTo { return $this->belongsTo(User::class); } }