This commit is contained in:
ct
2025-06-20 23:40:27 +08:00
parent 201837441d
commit e8e3def103
7 changed files with 69 additions and 18 deletions

View File

@@ -47,6 +47,7 @@ class Category extends Model
'sample_captions' => 'array',
'keywords' => 'array',
'payload' => 'object',
'system_memes_generated_count' => 'int',
];
protected $fillable = [
@@ -61,6 +62,7 @@ class Category extends Model
'sample_captions',
'keywords',
'payload',
'system_memes_generated_count',
];
/**

View File

@@ -18,8 +18,8 @@
* @property string $type
* @property int|null $category_id
* @property int|null $user_id
* @property int|null $meme_id
* @property int|null $background_id
* @property int|null $meme_media_id
* @property int|null $background_media_id
* @property string $status
* @property string $prompt
* @property string|null $caption
@@ -42,8 +42,8 @@ class Meme extends Model
'category_id' => 'int',
'user_id' => 'int',
'meme_id' => 'int',
'background_id' => 'int',
'meme_media_id' => 'int',
'background_media_id' => 'int',
'meme_keywords' => 'array',
'keywords' => 'array',
@@ -58,8 +58,8 @@ class Meme extends Model
'is_system',
'category_id',
'user_id',
'meme_id',
'background_id',
'meme_media_id',
'background_media_id',
'status',
'prompt',
'caption',
@@ -74,11 +74,11 @@ class Meme extends Model
public function meme_media()
{
return $this->hasOne(MemeMedia::class, 'id', 'meme_id');
return $this->hasOne(MemeMedia::class, 'id', 'meme_media_id');
}
public function background_media()
{
return $this->hasOne(BackgroundMedia::class, 'id', 'background_id');
return $this->hasOne(BackgroundMedia::class, 'id', 'background_media_id');
}
}