init project

This commit is contained in:
2026-05-10 13:21:24 +03:30
parent 5f210c6c73
commit dc36701c9d
26 changed files with 2149 additions and 69 deletions

View File

@@ -0,0 +1,46 @@
<?php
namespace App\Models;
use Database\Factories\EmbeddingUsageEventFactory;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
#[Fillable([
'user_id',
'tool',
'provider',
'model',
'embedding_dimensions',
'input_count',
'result_count',
'tokens',
])]
class EmbeddingUsageEvent extends Model
{
/** @use HasFactory<EmbeddingUsageEventFactory> */
use HasFactory;
/**
* @return BelongsTo<User, $this>
*/
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
/**
* @return array<string, string>
*/
protected function casts(): array
{
return [
'embedding_dimensions' => 'integer',
'input_count' => 'integer',
'result_count' => 'integer',
'tokens' => 'integer',
];
}
}