$timeEntries * @property-read Organization $organization * * @method static TagFactory factory() */ class Tag extends Model implements AuditableContract { use CustomAuditable; /** @use HasFactory */ use HasFactory; use HasJsonRelationships; use HasUuids; /** * The attributes that should be cast. * * @var array */ protected $casts = [ 'name' => 'string', ]; /** * @return BelongsTo */ public function organization(): BelongsTo { return $this->belongsTo(Organization::class, 'organization_id'); } /** * Warning: This relation based on a JSON column. Please make sure that there are no performance issues, before using it. * * @return HasManyJson */ public function timeEntries(): HasManyJson { return $this->hasManyJson(TimeEntry::class, 'tags'); } }