pub struct TechnicalInspectionUseCases { /* private fields */ }Implementations§
Source§impl TechnicalInspectionUseCases
impl TechnicalInspectionUseCases
pub fn new(repository: Arc<dyn TechnicalInspectionRepository>) -> Self
pub async fn create_technical_inspection( &self, dto: CreateTechnicalInspectionDto, ) -> Result<TechnicalInspectionResponseDto, String>
pub async fn get_technical_inspection( &self, id: Uuid, ) -> Result<Option<TechnicalInspectionResponseDto>, String>
pub async fn list_technical_inspections_by_building( &self, building_id: Uuid, ) -> Result<Vec<TechnicalInspectionResponseDto>, String>
pub async fn list_technical_inspections_by_organization( &self, organization_id: Uuid, ) -> Result<Vec<TechnicalInspectionResponseDto>, String>
pub async fn list_technical_inspections_paginated( &self, page_request: &PageRequest, filters: &TechnicalInspectionFilters, ) -> Result<TechnicalInspectionListResponseDto, String>
pub async fn get_overdue_inspections( &self, building_id: Uuid, ) -> Result<Vec<InspectionStatusDto>, String>
pub async fn get_upcoming_inspections( &self, building_id: Uuid, days: i32, ) -> Result<Vec<InspectionStatusDto>, String>
pub async fn get_inspections_by_type( &self, building_id: Uuid, inspection_type: &str, ) -> Result<Vec<TechnicalInspectionResponseDto>, String>
pub async fn update_technical_inspection( &self, id: Uuid, dto: UpdateTechnicalInspectionDto, ) -> Result<TechnicalInspectionResponseDto, String>
pub async fn mark_as_completed( &self, id: Uuid, ) -> Result<TechnicalInspectionResponseDto, String>
pub async fn add_report( &self, id: Uuid, dto: AddReportDto, ) -> Result<TechnicalInspectionResponseDto, String>
pub async fn add_photo( &self, id: Uuid, dto: AddInspectionPhotoDto, ) -> Result<TechnicalInspectionResponseDto, String>
pub async fn add_certificate( &self, id: Uuid, dto: AddCertificateDto, ) -> Result<TechnicalInspectionResponseDto, String>
pub async fn delete_technical_inspection( &self, id: Uuid, ) -> Result<bool, String>
Auto Trait Implementations§
impl Freeze for TechnicalInspectionUseCases
impl !RefUnwindSafe for TechnicalInspectionUseCases
impl Send for TechnicalInspectionUseCases
impl Sync for TechnicalInspectionUseCases
impl Unpin for TechnicalInspectionUseCases
impl !UnwindSafe for TechnicalInspectionUseCases
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Chain<T> for T
impl<T> Chain<T> for T
§impl<T> Fake for T
impl<T> Fake for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.