<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class UserMemeGeneration extends Model
{
    protected $fillable = [
        'user_id',
        'meme_id',
        'job_id',
        'prompt',
        'status',
        'credits_to_be_charged',
        'credits_are_processed',
    ];

    protected $casts = [
        'credits_are_processed' => 'boolean',
        'credits_to_be_charged' => 'integer',
    ];

    public function user(): BelongsTo
    {
        return $this->belongsTo(User::class);
    }

    public function meme(): BelongsTo
    {
        return $this->belongsTo(Meme::class);
    }
}
