elioria-sst-x
    Preparing search index...

    Class SupabaseInspectionActionPlanRepository

    Implements

    Index
    db: PostgresJsDatabase<packages/db/src/schema> & {}

    The db value.

    • Generated

      Executes archive.

      Parameters

      • id: string

        The id value.

      • tenantId: string

        The tenantId value.

      Returns Promise<InspectionActionPlan | null>

      The function result.

      Objective: In module packages/db/src/repositories/inspection-action-plan.repository.ts, run archive.

      Behavior: Async; accepts id and tenantId; returns a value; invokes this.db.update(inspectionActionPlans).set({ archivedAt: new .

    • Generated

      Returns the result of findById.

      Parameters

      • id: string

        The id value.

      • tenantId: string

        The tenantId value.

      Returns Promise<InspectionActionPlan | null>

      The function result.

      Objective: In module packages/db/src/repositories/inspection-action-plan.repository.ts, retrieve data through findById.

      Behavior: Async; accepts id and tenantId; returns a value; invokes this.db.select().from(inspectionActionPlans) .where(and(eq(i.

    • Generated

      Returns the result of findByInspection.

      Parameters

      • inspectionId: string

        The inspectionId value.

      • tenantId: string

        The tenantId value.

      Returns Promise<InspectionActionPlan[]>

      The function result.

      Objective: In module packages/db/src/repositories/inspection-action-plan.repository.ts, retrieve data through findByInspection.

      Behavior: Async; accepts inspectionId and tenantId; returns a value; invokes this.db.select().from(inspectionActionPlans) .where(and( eq(.

    • Generated

      Returns the result of findByTenant.

      Parameters

      • tenantId: string

        The tenantId value.

      Returns Promise<InspectionActionPlan[]>

      The function result.

      Objective: In module packages/db/src/repositories/inspection-action-plan.repository.ts, retrieve data through findByTenant.

      Behavior: Async; accepts tenantId; returns a value; invokes this.db.select().from(inspectionActionPlans) .where(and(eq(i.

    • Generated

      Updates data through updateStatus.

      Parameters

      • id: string

        The id value.

      • tenantId: string

        The tenantId value.

      • status: InspectionActionPlanStatus

        The status value.

      Returns Promise<InspectionActionPlan | null>

      The function result.

      Objective: In module packages/db/src/repositories/inspection-action-plan.repository.ts, change data through updateStatus.

      Behavior: Async; accepts id and tenantId and status; returns a value; invokes this.db.update(inspectionActionPlans).set({ status, ...extra.