initial import
This commit is contained in:
35
app/Models/ApiProvider.php
Normal file
35
app/Models/ApiProvider.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ApiProvider extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'api_url',
|
||||
'username',
|
||||
'password',
|
||||
'token',
|
||||
'plugin',
|
||||
'enabled',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'enabled' => 'boolean',
|
||||
];
|
||||
|
||||
public function styles()
|
||||
{
|
||||
return $this->hasMany(Style::class);
|
||||
}
|
||||
|
||||
public function aiModels()
|
||||
{
|
||||
return $this->belongsToMany(AiModel::class, 'ai_model_api_provider');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user