'integer', 'type_dict_item_id' => 'integer', 'status_dict_item_id' => 'integer', 'submitted_at' => 'datetime', 'miniapp_user_id' => 'integer', ]; public function teacher(): BelongsTo { return $this->belongsTo(Teacher::class); } public function typeItem(): BelongsTo { return $this->belongsTo(DictItem::class, 'type_dict_item_id'); } public function statusItem(): BelongsTo { return $this->belongsTo(DictItem::class, 'status_dict_item_id'); } public function handleLogs(): HasMany { return $this->hasMany(DemandHandleLog::class)->orderByDesc('handled_at')->orderByDesc('id'); } }