This commit is contained in:
ct
2025-07-04 14:55:56 +08:00
parent b5ac848ba2
commit b3ffc261a3
8 changed files with 320 additions and 4 deletions

View File

@@ -0,0 +1,34 @@
<?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);
}
}