芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/qrafiqxcreativeagency.com/accounts/office/app/Models/EmployeeShiftSchedule.php
'datetime', 'shift_start_time' => 'datetime', 'shift_end_time' => 'datetime', ]; protected $appends = ['file_url', 'download_file_url']; protected $guarded = ['id']; protected $with = ['shift']; public function getFileUrlAttribute() { return ($this->file) ? asset_url_local_s3('employee-shift-file/'. $this->id.'/' . $this->file) : ''; } public function getDownloadFileUrlAttribute() { return ($this->file) ? asset_url_local_s3('employee-shift-file/'. $this->id.'/' . $this->file) : null; } public function user(): BelongsTo { return $this->belongsTo(User::class, 'user_id'); } public function shift(): BelongsTo { return $this->belongsTo(EmployeeShift::class, 'employee_shift_id'); } public function requestChange(): HasOne { return $this->hasOne(EmployeeShiftChangeRequest::class, 'shift_schedule_id'); } public function pendingRequestChange(): HasOne { return $this->hasOne(EmployeeShiftChangeRequest::class, 'shift_schedule_id')->where('status', 'waiting'); } }