add dated assignment endpoint

This commit is contained in:
Yisroel Baum 2026-08-15 21:50:37 +03:00
parent 6afe7864be
commit 483ca6fc1d
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
9 changed files with 252 additions and 8 deletions

View file

@ -5,6 +5,7 @@ namespace App\Schedule;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* @property int $id
@ -14,6 +15,7 @@ use Illuminate\Database\Eloquent\Model;
* @property list<string> $element_path
* @property string $scheduled_date
* @property int $position
* @property-read ScheduleModel $schedule
*
* @method static Builder<static>|ScheduleAssignmentModel newModelQuery()
* @method static Builder<static>|ScheduleAssignmentModel newQuery()
@ -46,4 +48,12 @@ class ScheduleAssignmentModel extends Model
'position' => 'integer',
];
}
/**
* @return BelongsTo<ScheduleModel, $this>
*/
public function schedule(): BelongsTo
{
return $this->belongsTo(ScheduleModel::class, 'schedule_id');
}
}