elioria-sst-x
    Preparing search index...

    Class SupabaseCipaApuracaoFisicaRepository

    Implements

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

    The db value.

    • Generated

      Executes approveIfPending.

      Parameters

      • id: string

        The id value.

      • tenantId: string

        The tenantId value.

      • approvedBy: string

        The approvedBy value.

      • approvedAt: Date

        The approvedAt value.

      Returns Promise<CipaApuracaoFisicaRecord | null>

      The function result.

      Objective: In module packages/db/src/repositories/cipa.repository.ts, run approveIfPending.

      Behavior: Async; accepts id and tenantId and approvedBy and approvedAt; returns a value; invokes this.db.update(cipaApuracaoFisica) .set({ aprovada: true, ap.

    • Generated

      Executes create.

      Parameters

      • data: Omit<
            CipaApuracaoFisicaRecord,
            | "id"
            | "createdAt"
            | "updatedAt"
            | "aprovada"
            | "aprovadaPor"
            | "aprovadaEm",
        >

        The data value.

      Returns Promise<CipaApuracaoFisicaRecord>

      The function result.

      Objective: In module packages/db/src/repositories/cipa.repository.ts, run create.

      Behavior: Async; accepts data; returns a value; invokes this.db.insert(cipaApuracaoFisica).values({ tenantId: data.t.

    • Generated

      Returns the result of findByElection.

      Parameters

      • electionId: string

        The electionId value.

      • tenantId: string

        The tenantId value.

      Returns Promise<CipaApuracaoFisicaRecord[]>

      The function result.

      Objective: In module packages/db/src/repositories/cipa.repository.ts, retrieve data through findByElection.

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

    • Generated

      Returns the result of findLatestByElection.

      Parameters

      • electionId: string

        The electionId value.

      • tenantId: string

        The tenantId value.

      Returns Promise<CipaApuracaoFisicaRecord | null>

      The function result.

      Objective: In module packages/db/src/repositories/cipa.repository.ts, retrieve data through findLatestByElection.

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

    • Generated

      Executes update.

      Parameters

      • id: string

        The id value.

      • tenantId: string

        The tenantId value.

      • data: Partial<CipaApuracaoFisicaRecord>

        The data value.

      Returns Promise<CipaApuracaoFisicaRecord | null>

      The function result.

      Objective: In module packages/db/src/repositories/cipa.repository.ts, run update.

      Behavior: Async; accepts id and tenantId and data; returns a value; invokes this.db.update(cipaApuracaoFisica).set(payload) .where(and(e.