add set scheduling api
This commit is contained in:
parent
bdb266746d
commit
98ae9bf088
20 changed files with 935 additions and 1 deletions
46
backend/app/Schedule/ScheduleModel.php
Normal file
46
backend/app/Schedule/ScheduleModel.php
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
|
||||
namespace App\Schedule;
|
||||
|
||||
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
* @property int $user_id
|
||||
* @property int $set_id
|
||||
* @property string $element_kind
|
||||
* @property string $start_date
|
||||
* @property string $target_date
|
||||
*
|
||||
* @method static Builder<static>|ScheduleModel newModelQuery()
|
||||
* @method static Builder<static>|ScheduleModel newQuery()
|
||||
* @method static Builder<static>|ScheduleModel query()
|
||||
*
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
#[Fillable([
|
||||
'user_id',
|
||||
'set_id',
|
||||
'element_kind',
|
||||
'start_date',
|
||||
'target_date',
|
||||
])]
|
||||
class ScheduleModel extends Model
|
||||
{
|
||||
protected $table = 'schedules';
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
/**
|
||||
* @return array<string, string>
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'user_id' => 'integer',
|
||||
'set_id' => 'integer',
|
||||
];
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue