add dated assignment endpoint
This commit is contained in:
parent
6afe7864be
commit
483ca6fc1d
9 changed files with 252 additions and 8 deletions
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue