elioria-sst-x
    Preparing search index...

    Class SupabaseCipaPlanoAcaoRepository

    Implements

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

    The db value.

    • Generated

      Returns the result of findById.

      Parameters

      • id: string

        The id value.

      • tenantId: string

        The tenantId value.

      Returns Promise<CipaPlanoAcao | null>

      The function result.

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

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

    • Generated

      Returns the result of findByMandate.

      Parameters

      • mandateId: string

        The mandateId value.

      • tenantId: string

        The tenantId value.

      Returns Promise<CipaPlanoAcao[]>

      The function result.

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

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

    • Generated

      Returns the result of findByStatus.

      Parameters

      • mandateId: string

        The mandateId value.

      • tenantId: string

        The tenantId value.

      • status: CipaPlanoAcaoStatus

        The status value.

      Returns Promise<CipaPlanoAcao[]>

      The function result.

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

      Behavior: Async; accepts mandateId and tenantId and status; returns a value; invokes this.db.select().from(cipaPlanoAcao).where(and(eq(cipaPlanoA.

    • Generated

      Executes update.

      Parameters

      • id: string

        The id value.

      • tenantId: string

        The tenantId value.

      • data: Partial<
            CreateCipaPlanoAcaoData & {
                concluidaEm: Date;
                percentualConclusao: number;
                status: CipaPlanoAcaoStatus;
                transferidaParaId: string;
                verificacaoEficacia: string;
            },
        >

        The data value.

      Returns Promise<CipaPlanoAcao | 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(cipaPlanoAcao).set(payload).where(and(eq(cipa.