feat: implement AI styling foundation and billing scope rework
This commit is contained in:
51
app/Models/AiEditOutput.php
Normal file
51
app/Models/AiEditOutput.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class AiEditOutput extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'request_id',
|
||||
'photo_id',
|
||||
'storage_disk',
|
||||
'storage_path',
|
||||
'mime_type',
|
||||
'width',
|
||||
'height',
|
||||
'bytes',
|
||||
'checksum',
|
||||
'provider_asset_id',
|
||||
'provider_url',
|
||||
'is_primary',
|
||||
'safety_state',
|
||||
'safety_reasons',
|
||||
'generated_at',
|
||||
'metadata',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'is_primary' => 'boolean',
|
||||
'safety_reasons' => 'array',
|
||||
'metadata' => 'array',
|
||||
'generated_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
|
||||
public function request(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(AiEditRequest::class, 'request_id');
|
||||
}
|
||||
|
||||
public function photo(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Photo::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user