null, "user_id" => null, "pedido_id" => null, "factura_id" => null, "presupuesto_id" => null, "orden_trabajo_id" => null, ]; protected $casts = [ "chat_department_id" => "integer", "user_id" => "integer", "pedido_id" => "?integer", "factura_id" => "?integer", "presupuesto_id" => "?integer", "orden_trabajo_id" => "?integer", ]; public function user() : ?UserEntity { $m = model(UserModel::class); return $m->find($this->attributes['user_id']); } public function department() : ?ChatDepartmentEntity { $m = model(ChatDeparmentModel::class); return $m->find($this->attributes['chat_department_id']); } public function presupuesto() : ?PresupuestoEntity { $m = model(PresupuestoModel::class); return $m->find($this->attributes['presupuesto_id']); } public function pedido() : ?PedidoEntity { $m = model(PedidoModel::class); return $m->find($this->attributes['pedido_id']); } public function factura() : ?FacturaEntity { $m = model(FacturaEntity::class); return $m->find($this->attributes['factura_id']); } }