| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- namespace App\Models;
- use App\Models\Dictionary\Area;
- use App\Models\Dictionary\District;
- use Illuminate\Database\Eloquent\Factories\HasFactory;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Database\Eloquent\Relations\BelongsTo;
- class Schedule extends Model
- {
- use HasFactory;
- protected $fillable = [
- 'installation_date',
- 'address_code',
- 'manual',
- 'source',
- 'order_id',
- 'district_id',
- 'area_id',
- 'object_address',
- 'object_type',
- 'mafs',
- 'mafs_count',
- 'brigadier_id',
- 'comment',
- 'transport',
- 'admin_comment',
- ];
- public function district(): BelongsTo
- {
- return $this->belongsTo(District::class);
- }
- public function area(): BelongsTo
- {
- return $this->belongsTo(Area::class);
- }
- public function brigadier(): BelongsTo
- {
- return $this->belongsTo(User::class, 'brigadier_id', 'id');
- }
- }
|