<?php
namespace App\Models;use Illuminate\Database\Eloquent\{Builder,Model};use Illuminate\Database\Eloquent\Concerns\HasUlids;use Illuminate\Database\Eloquent\Relations\BelongsTo;
class ProjectCompetitor extends Model{use HasUlids;protected$fillable=['name','domain','normalized_domain','created_by'];protected function casts():array{return['archived_at'=>'datetime'];}public function uniqueIds():array{return['ulid'];}public function getRouteKeyName():string{return'ulid';}public function project():BelongsTo{return$this->belongsTo(Project::class);}public function creator():BelongsTo{return$this->belongsTo(User::class,'created_by');}public function scopeActive(Builder$q):Builder{return$q->where('status','active')->whereNull('archived_at');}}
