Skip to content

Commit

Permalink
feat(api-service): implement business-logic resources up to 07-horari…
Browse files Browse the repository at this point in the history
…o-academico
  • Loading branch information
guesant committed Oct 29, 2024
1 parent bf8b294 commit b7cfd13
Show file tree
Hide file tree
Showing 55 changed files with 6,121 additions and 2,421 deletions.
2 changes: 1 addition & 1 deletion api-service/src/app.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Controller, Get } from "@nestjs/common";
import { ApiResponse, ApiTags } from "@nestjs/swagger";
import { AppService } from "./app.service";

@ApiTags("Base")
@ApiTags("base")
@Controller()
export class AppController {
constructor(private readonly appService: AppService) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,72 @@ export type IAuthzStatementDisponibilidadeFind = IBaseAuthzFilter<"disponibilida

// =====================

export type IAuthzStatementDisponibilidadeDiaCreate = IBaseAuthzCheck<
"disponibilidade_dia:create",
{
dto: LadesaTypings.DisponibilidadeDiaCreateOperationInput;
}
>;
export type IAuthzStatementDisponibilidadeDiaUpdate = IBaseAuthzFilter<
"disponibilidade_dia:update",
{
dto: LadesaTypings.DisponibilidadeDiaUpdateByIdOperationInput;
}
>;
export type IAuthzStatementDisponibilidadeDiaDelete = IBaseAuthzFilter<
"disponibilidade_dia:delete",
{
dto: LadesaTypings.DisponibilidadeDiaFindOneInputView;
}
>;
export type IAuthzStatementDisponibilidadeDiaFind = IBaseAuthzFilter<"disponibilidade_dia:find">;

// =====================

export type IAuthzStatementTurmaDisponibilidadeCreate = IBaseAuthzCheck<
"turma_disponibilidade:create",
{
dto: LadesaTypings.TurmaDisponibilidadeCreateOperationInput;
}
>;
export type IAuthzStatementTurmaDisponibilidadeUpdate = IBaseAuthzFilter<
"turma_disponibilidade:update",
{
dto: LadesaTypings.TurmaDisponibilidadeUpdateByIdOperationInput;
}
>;
export type IAuthzStatementTurmaDisponibilidadeDelete = IBaseAuthzFilter<
"turma_disponibilidade:delete",
{
dto: LadesaTypings.TurmaDisponibilidadeFindOneInputView;
}
>;
export type IAuthzStatementTurmaDisponibilidadeFind = IBaseAuthzFilter<"turma_disponibilidade:find">;

// =====================

export type IAuthzStatementProfessorDisponibilidadeCreate = IBaseAuthzCheck<
"professor_disponibilidade:create",
{
dto: LadesaTypings.ProfessorDisponibilidadeCreateOperationInput;
}
>;
export type IAuthzStatementProfessorDisponibilidadeUpdate = IBaseAuthzFilter<
"professor_disponibilidade:update",
{
dto: LadesaTypings.ProfessorDisponibilidadeUpdateByIdOperationInput;
}
>;
export type IAuthzStatementProfessorDisponibilidadeDelete = IBaseAuthzFilter<
"professor_disponibilidade:delete",
{
dto: LadesaTypings.ProfessorDisponibilidadeFindOneInputView;
}
>;
export type IAuthzStatementProfessorDisponibilidadeFind = IBaseAuthzFilter<"professor_disponibilidade:find">;

// =====================

export type IAuthzStatementDiarioPreferenciaAgrupamentoCreate = IBaseAuthzCheck<
"diario_preferencia_agrupamento:create",
{
Expand Down Expand Up @@ -595,6 +661,9 @@ export type IAuthzStatementCheck =
| IAuthzStatementEtapaCreate
| IAuthzStatementAulaCreate
| IAuthzStatementDisponibilidadeCreate
| IAuthzStatementDisponibilidadeDiaCreate
| IAuthzStatementTurmaDisponibilidadeCreate
| IAuthzStatementProfessorDisponibilidadeCreate
| IAuthzStatementDiarioPreferenciaAgrupamentoCreate
| IAuthzStatementHorarioGeradoCreate
| IAuthzStatementHorarioGeradoAulaCreate;
Expand Down Expand Up @@ -673,6 +742,15 @@ export type IAuthzStatementFilter =
| IAuthzStatementDisponibilidadeUpdate
| IAuthzStatementDisponibilidadeFind
| IAuthzStatementDisponibilidadeDelete
| IAuthzStatementDisponibilidadeDiaUpdate
| IAuthzStatementDisponibilidadeDiaFind
| IAuthzStatementDisponibilidadeDiaDelete
| IAuthzStatementTurmaDisponibilidadeUpdate
| IAuthzStatementTurmaDisponibilidadeFind
| IAuthzStatementTurmaDisponibilidadeDelete
| IAuthzStatementProfessorDisponibilidadeUpdate
| IAuthzStatementProfessorDisponibilidadeFind
| IAuthzStatementProfessorDisponibilidadeDelete
| IAuthzStatementDiarioPreferenciaAgrupamentoUpdate
| IAuthzStatementDiarioPreferenciaAgrupamentoFind
| IAuthzStatementDiarioPreferenciaAgrupamentoDelete
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Controller, Get, Param, Query, type StreamableFile } from "@nestjs/comm
import { ApiTags } from "@nestjs/swagger";
import { ArquivoService } from "./arquivo.service";

@ApiTags("Arquivos")
@ApiTags("arquivos")
@Controller("/arquivos")
export class ArquivoController {
constructor(private arquivoService: ArquivoService) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Controller, Get } from "@nestjs/common";
import { ApiTags } from "@nestjs/swagger";
import { CidadeService } from "./cidade.service";

@ApiTags("Cidades")
@ApiTags("cidades")
@Controller("/base/cidades")
export class CidadeController {
constructor(private cidadeService: CidadeService) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Controller, Get } from "@nestjs/common";
import { ApiTags } from "@nestjs/swagger";
import { EstadoService } from "./estado.service";

@ApiTags("Estados")
@ApiTags("estados")
@Controller("/base/estados")
export class EstadoController {
constructor(private estadoService: EstadoService) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Controller, Get, Post } from "@nestjs/common";
import { ApiTags } from "@nestjs/swagger";
import { AutenticacaoService } from "./autenticacao.service";

@ApiTags("Autenticacao")
@ApiTags("autenticacao")
@Controller("/autenticacao")
export class AutenticacaoController {
constructor(private readonly autenticacaoService: AutenticacaoService) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { ApiTags } from "@nestjs/swagger";
import { UsuarioService } from "./usuario.service";

@Controller("/usuarios")
@ApiTags("Usuarios")
@ApiTags("usuarios")
export class UsuarioController {
constructor(private usuarioService: UsuarioService) {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Controller, Delete, Get, Param, ParseUUIDPipe, Patch, Post, Put, Upload
import { ApiTags } from "@nestjs/swagger";
import { AmbienteService } from "./ambiente.service";

@ApiTags("Ambientes")
@ApiTags("ambientes")
@Controller("/ambientes")
export class AmbienteController {
constructor(private ambienteService: AmbienteService) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Controller, Delete, Get, Param, ParseUUIDPipe, Patch, Post, Put, Upload
import { ApiTags } from "@nestjs/swagger";
import { BlocoService } from "./bloco.service";

@ApiTags("Blocos")
@ApiTags("blocos")
@Controller("/blocos")
export class BlocoController {
constructor(private blocoService: BlocoService) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Controller, Delete, Get, Patch, Post } from "@nestjs/common";
import { ApiTags } from "@nestjs/swagger";
import { CampusService } from "./campus.service";

@ApiTags("Campi")
@ApiTags("campi")
@Controller("/campi")
export class CampusController {
constructor(private campusService: CampusService) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Controller, Delete, Get, Patch, Post } from "@nestjs/common";
import { ApiTags } from "@nestjs/swagger";
import { ReservaService } from "./reserva.service";

@ApiTags("Reservas")
@ApiTags("reservas")
@Controller("/reservas")
export class ReservaController {
constructor(private reservaService: ReservaService) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Controller } from "@nestjs/common";
import { ApiTags } from "@nestjs/swagger";
import { AutorizacaoService } from "./autorizacao.service";

@ApiTags("Autorizacao")
@ApiTags("autorizacao")
@Controller("/autorizacao")
export class AutorizacaoController {
constructor(readonly autorizacaoService: AutorizacaoService) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { ApiTags } from "@nestjs/swagger";
import { PerfilService } from "./perfil.service";

@Controller("/vinculos")
@ApiTags("Vinculos")
@ApiTags("perfis")
export class PerfilController {
constructor(private vinculoService: PerfilService) {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Controller, Delete, Get, Param, ParseUUIDPipe, Patch, Post, Put, Upload
import { ApiTags } from "@nestjs/swagger";
import { CursoService } from "./curso.service";

@ApiTags("Cursos")
@ApiTags("cursos")
@Controller("/cursos")
export class CursoController {
constructor(private cursoService: CursoService) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Controller, Delete, Get, Param, ParseUUIDPipe, Patch, Post, Put, Upload
import { ApiTags } from "@nestjs/swagger";
import { DisciplinaService } from "./disciplina.service";

@ApiTags("Disciplinas")
@ApiTags("disciplinas")
@Controller("/disciplinas")
export class DisciplinaController {
constructor(private disciplinaService: DisciplinaService) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Controller, Delete, Get, Patch, Post } from "@nestjs/common";
import { ApiTags } from "@nestjs/swagger";
import { ModalidadeService } from "./modalidade.service";

@ApiTags("Modalidades")
@ApiTags("modalidades")
@Controller("/modalidades")
export class ModalidadeController {
constructor(private modalidadeService: ModalidadeService) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Controller, Delete, Get, Patch, Post } from "@nestjs/common";
import { ApiTags } from "@nestjs/swagger";
import { NivelFormacaoService } from "./nivel-formacao.service";

@ApiTags("NivelFormacao")
@ApiTags("niveis-formacoes")
@Controller("/niveis-formacoes")
export class NivelFormacaoController {
constructor(private nivelformacaoService: NivelFormacaoService) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Controller, Delete, Get, Patch, Post } from "@nestjs/common";
import { ApiTags } from "@nestjs/swagger";
import { OfertaFormacaoNivelFormacaoService } from "./oferta-formacao-nivel-formacao.service";

@ApiTags("OfertaFormacaoNivelFormacao")
@ApiTags("ofertas-formacoes-niveis-formacoes")
@Controller("/ofertas-formacoes-niveis-formacoes")
export class OfertaFormacaoNivelFormacaoController {
constructor(private ofertaFormacaoNivelFormacaoService: OfertaFormacaoNivelFormacaoService) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export class OfertaFormacaoNivelFormacaoService {
this.ofertaFormacaoNivelFormacaoRepository.createQueryBuilder(aliasOfertaFormacaoNivelFormacao),
);

const dtoOfertaFormacaoNivelFormacao = pick(dto.body, ["nome", "slug"]);
const dtoOfertaFormacaoNivelFormacao = pick(dto.body, []);

const ofertaFormacaoNivelFormacao = <OfertaFormacaoNivelFormacaoEntity>{
id: currentOfertaFormacaoNivelFormacao.id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Controller, Delete, Get, Patch, Post } from "@nestjs/common";
import { ApiTags } from "@nestjs/swagger";
import { OfertaFormacaoService } from "./oferta-formacao.service";

@ApiTags("OfertaFormacao")
@ApiTags("ofertas-formacoes")
@Controller("/ofertas-formacoes")
export class OfertaFormacaoController {
constructor(private ofertaFormacaoService: OfertaFormacaoService) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Controller, Delete, Get, Patch, Post } from "@nestjs/common";
import { ApiTags } from "@nestjs/swagger";
import { CalendarioLetivoService } from "./calendario-letivo.service";

@ApiTags("Calendarios Letivos")
@ApiTags("calendarios-letivos")
@Controller("/calendarios-letivos")
export class CalendarioLetivoController {
constructor(private calendarioLetivoService: CalendarioLetivoService) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Controller, Delete, Get, Patch, Post } from "@nestjs/common";
import { ApiTags } from "@nestjs/swagger";
import { DiaCalendarioService } from "./dia-calendario.service";

@ApiTags("Dias Calendario")
@ApiTags("dias-calendarios")
@Controller("/dias-calendario")
export class DiaCalendarioController {
constructor(private diaCalendarioService: DiaCalendarioService) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Controller, Delete, Get, Patch, Post } from "@nestjs/common";
import { ApiTags } from "@nestjs/swagger";
import { EtapaService } from "./etapa.service";

@ApiTags("Etapas")
@ApiTags("etapas")
@Controller("/etapas")
export class EtapaController {
constructor(private etapaService: EtapaService) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Controller, Delete, Get, Patch, Post } from "@nestjs/common";
import { ApiTags } from "@nestjs/swagger";
import { EventoService } from "./evento.service";

@ApiTags("Eventos")
@ApiTags("eventos")
@Controller("/eventos")
export class EventoController {
constructor(private eventoService: EventoService) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { Controller, Delete, Get, Patch, Post } from "@nestjs/common";
import { ApiTags } from "@nestjs/swagger";
import { GradeHorarioOfertaFormacaoIntervaloDeTempoService } from "./grade-horario-oferta-formacao-intervalo-de-tempo.service";

@ApiTags("GradeHorarioOfertaFormacaoIntervaloDeTempo")
@Controller("/grades-horario-ofertas-formacao-intervalos-de-tempo")
@ApiTags("grades-horarios-ofertas-formacoes-intervalos-de-tempo")
@Controller("/grades-horarios-ofertas-formacoes-intervalos-de-tempo")
export class GradeHorarioOfertaFormacaoIntervaloDeTempoController {
constructor(private gradeHorarioOfertaFormacaoIntervaloDeTempoService: GradeHorarioOfertaFormacaoIntervaloDeTempoService) {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Controller, Delete, Get, Patch, Post } from "@nestjs/common";
import { ApiTags } from "@nestjs/swagger";
import { GradeHorarioOfertaFormacaoService } from "./grade-horario-oferta-formacao.service";

@ApiTags("GradeHorarioOfertaFormacao")
@ApiTags("grades-horarios-ofertas-formacoes")
@Controller("/grades-horarios-ofertas-formacoes")
export class GradeHorarioOfertaFormacaoController {
constructor(private gradeHorarioOfertaFormacaoService: GradeHorarioOfertaFormacaoService) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Controller, Delete, Get, Patch, Post } from "@nestjs/common";
import { ApiTags } from "@nestjs/swagger";
import { AulaService } from "./aula.service";

@ApiTags("Aulas")
@ApiTags("aulas")
@Controller("/aulas")
export class AulaController {
constructor(private aulaService: AulaService) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Controller, Delete, Get, Patch, Post } from "@nestjs/common";
import { ApiTags } from "@nestjs/swagger";
import { DiarioProfessorService } from "./diario-professor.service";

@ApiTags("DiarioProfessor")
@ApiTags("diario-professor")
@Controller("/diario-professor")
export class DiarioProfessorController {
constructor(private diarioProfessorService: DiarioProfessorService) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Controller, Delete, Get, Patch, Post } from "@nestjs/common";
import { ApiTags } from "@nestjs/swagger";
import { DiarioService } from "./diario.service";

@ApiTags("Diarios")
@ApiTags("diarios")
@Controller("/diarios")
export class DiarioController {
constructor(private diarioService: DiarioService) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Controller, Delete, Get, Param, ParseUUIDPipe, Patch, Post, Put, Upload
import { ApiTags } from "@nestjs/swagger";
import { TurmaService } from "./turma.service";

@ApiTags("Turmas")
@ApiTags("turmas")
@Controller("/turmas")
export class TurmaController {
constructor(private turmaService: TurmaService) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Controller, Delete, Get, Patch, Post } from "@nestjs/common";
import { ApiTags } from "@nestjs/swagger";
import { DiarioPreferenciaAgrupamentoService } from "./diario-preferencia-agrupamento.service";

@ApiTags("Diarios Preferencia Agrupamento")
@ApiTags("diarios-preferencia-agrupamento")
@Controller("/diarios-preferencia-agrupamento")
export class DiarioPreferenciaAgrupamentoController {
constructor(private diarioPreferenciaAgrupamentoService: DiarioPreferenciaAgrupamentoService) {}
Expand Down
Loading

0 comments on commit b7cfd13

Please sign in to comment.