Initial commit: Runware-powered content generator foundation
Laravel app with a cost-tracked Runware.ai integration (image, video, text generation), a hard monthly EUR budget cap with live USD/EUR FX conversion, and a locally-maintained model/pricing table since Runware's model-search API doesn't expose pricing.
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Generation extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'batch_id',
|
||||
'type',
|
||||
'model',
|
||||
'prompt',
|
||||
'params',
|
||||
'status',
|
||||
'runware_task_uuid',
|
||||
'cost_usd',
|
||||
'cost_eur',
|
||||
'cost_is_estimated',
|
||||
'output_path',
|
||||
'output_text',
|
||||
'error',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'params' => 'array',
|
||||
'cost_usd' => 'decimal:6',
|
||||
'cost_eur' => 'decimal:6',
|
||||
'cost_is_estimated' => 'boolean',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user