elioria-sst-x
    Preparing search index...

    Class SupabaseEpiPurchaseRequestItemRepository

    Implements

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

    The db value.

    • Generated

      Updates data through createMany.

      Parameters

      • data: CreateEpiPurchaseRequestItemData[]

        The data value.

      Returns Promise<EpiPurchaseRequestItem[]>

      The function result.

      Objective: In module packages/db/src/repositories/epi-purchase-request.repository.ts, change data through createMany.

      Behavior: Async; accepts data; returns a value; invokes this.db .insert(epiPurchaseRequestItems) .values( data.map(/.

    • Generated

      Updates data through deleteByRequestId.

      Parameters

      • requestId: string

        The requestId value.

      • tenantId: string

        The tenantId value.

      Returns Promise<void>

      The function result.

      Objective: In module packages/db/src/repositories/epi-purchase-request.repository.ts, change data through deleteByRequestId.

      Behavior: Async; accepts requestId and tenantId; returns a value; invokes this.db .delete(epiPurchaseRequestItems) .where.

    • Generated

      Returns the result of findByRequestId.

      Parameters

      • requestId: string

        The requestId value.

      • tenantId: string

        The tenantId value.

      Returns Promise<EpiPurchaseRequestItem[]>

      The function result.

      Objective: In module packages/db/src/repositories/epi-purchase-request.repository.ts, retrieve data through findByRequestId.

      Behavior: Async; accepts requestId and tenantId; returns a value; invokes this.db .select() .from(epiPurchaseRequestItems) .where.

    • Generated

      Returns the result of getCommittedByUnit.

      Parameters

      • tenantId: string

        The tenantId value.

      • unitId: string

        The unitId value.

      Returns Promise<
          {
              committedPending: number;
              epiCatalogId: string;
              epiCatalogVariantId: string
              | null;
          }[],
      >

      The function result.

      Objective: In module packages/db/src/repositories/epi-purchase-request.repository.ts, retrieve data through getCommittedByUnit.

      Behavior: Async; accepts tenantId and unitId; returns a value; invokes this.db .select({ epiCatalogId: epiPurchaseRequestItems.epiC.

    • Generated

      Updates data through updateApprovedQuantities.

      Parameters

      • items: { approvedQuantity: number; id: string }[]

        The items value.

      Returns Promise<void>

      The function result.

      Objective: In module packages/db/src/repositories/epi-purchase-request.repository.ts, change data through updateApprovedQuantities.

      Behavior: Async; accepts items; returns a value; invokes this.db .update(epiPurchaseRequestItems) .set({ approvedQuan.

    • Generated

      Updates data through updateReceivedQuantity.

      Parameters

      • id: string

        The id value.

      • tenantId: string

        The tenantId value.

      • receivedQuantity: number

        The receivedQuantity value.

      • lastReceivedAt: Date

        The lastReceivedAt value.

      Returns Promise<void>

      The function result.

      Objective: In module packages/db/src/repositories/epi-purchase-request.repository.ts, change data through updateReceivedQuantity.

      Behavior: Async; accepts id and tenantId and receivedQuantity and lastReceivedAt; returns a value; invokes this.db .update(epiPurchaseRequestItems) .set({ receivedQuan.