mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-12 02:02:15 +01:00
Add report exports
This commit is contained in:
committed by
Constantin Graf
parent
e54df74d5d
commit
64535ceea6
@@ -12,6 +12,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Support\Carbon;
|
||||
use OwenIt\Auditing\Contracts\Auditable as AuditableContract;
|
||||
use Staudenmeir\EloquentJsonRelations\HasJsonRelationships;
|
||||
use Staudenmeir\EloquentJsonRelations\Relations\HasManyJson;
|
||||
|
||||
/**
|
||||
* @property string $id
|
||||
@@ -30,6 +32,7 @@ class Tag extends Model implements AuditableContract
|
||||
/** @use HasFactory<TagFactory> */
|
||||
use HasFactory;
|
||||
|
||||
use HasJsonRelationships;
|
||||
use HasUuids;
|
||||
|
||||
/**
|
||||
@@ -48,4 +51,14 @@ class Tag extends Model implements AuditableContract
|
||||
{
|
||||
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<TimeEntry, $this>
|
||||
*/
|
||||
public function timeEntries(): HasManyJson
|
||||
{
|
||||
return $this->hasManyJson(TimeEntry::class, 'tags');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user