35 lines
645 B
PHP
35 lines
645 B
PHP
<?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',
|
||
|
|
];
|
||
|
|
}
|
||
|
|
}
|