fashionscape/app/Models/Outfit.php
Alyx Batte cc550d9677
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
Initial commit
2025-12-09 09:04:09 -05:00

43 lines
974 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Concerns\HasUuids;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasOne;
class Outfit extends Model
{
use HasUuids;
protected $table = 'outfits';
protected $primaryKey = 'object_id';
public string $object_id;
public string $submitter_id;
public string $tag;
public string $link;
public string $file_path;
public string $meta;
public bool $is_deleted;
public bool $is_featured;
public int $view_count;
public int $likes;
public string $delete_hash;
public function user(): BelongsTo
{
return $this->belongsTo(DiscordUser::class, 'id', 'submitter_id');
}
public function casts(): array
{
return [
'date' => 'date',
'is_deleted' => 'boolean',
'is_featured' => 'boolean',
];
}
}