Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 9927cfe
Merge: 5cd3128 16ff682
Author: Lucas Ronchi <[email protected]>
Date:   Wed Mar 20 12:16:52 2024 -0300

    Merge pull request #6 from lucas0headshot/lucas

    Implementar RNs e validações nas Classes

commit 16ff682
Merge: b56f9a2 5cd3128
Author: Lucas Ronchi <[email protected]>
Date:   Wed Mar 20 01:35:18 2024 -0300

    Merge branch 'dev' into lucas

commit b56f9a2
Author: lucas0headshot <[email protected]>
Date:   Wed Mar 20 01:15:34 2024 -0300

    feat: add RN limite inscrição na turma

    Adicionar validação da RN de limite de inscrição em uma Turma

commit 97801a4
Author: lucas0headshot <[email protected]>
Date:   Wed Mar 20 01:14:34 2024 -0300

    feat: add validação CPF, TituloEleitoral & Email no Funcionario

    Adicionar validação do CPF, TituloEleitoral & Email na classe Funcionario

commit 4a139e9
Author: lucas0headshot <[email protected]>
Date:   Wed Mar 20 01:13:56 2024 -0300

    feat: add validação nota min & max na Avaliação

    Adicionar validação de nota mínima e máxima na classe Avaliação

commit 46428fe
Author: lucas0headshot <[email protected]>
Date:   Wed Mar 20 01:11:59 2024 -0300

    refactor: add attr "limiteQtdInscritos" na Turma

    Adicionar atributo "limiteQtdInscritos" na classe Turma

commit 5e985ab
Author: lucas0headshot <[email protected]>
Date:   Wed Mar 20 01:11:14 2024 -0300

    feat: add validação CPF no Funcionario

    Adicionar validação CPF no Service do Funcionario e o método no Repository

commit 946e604
Author: lucas0headshot <[email protected]>
Date:   Wed Mar 20 00:55:16 2024 -0300

    raw: add dependências HibernateValidator & ValidationAPI

    Adicionar dependências do HibernateValidator e ValidationAPI no pom.xml

commit fbccd36
Author: lucas0headshot <[email protected]>
Date:   Wed Mar 20 00:53:23 2024 -0300

    fix: add default page size > 0 nos Controllers

    Alterar o page size default para maior que 0 nos Controllers.
    Anteriormente estava 0, o que ocasionava numa Exception

commit ebee8d6
Author: lucas0headshot <[email protected]>
Date:   Wed Mar 20 00:02:53 2024 -0300

    refactor: add extens AbstractController em todos Controllers

    Adicionar extensão do AbstractController em todos os Controllers

commit 440dfe3
Author: lucas0headshot <[email protected]>
Date:   Wed Mar 20 00:02:11 2024 -0300

    feat: add AbstractController

    Adicionar AbstractController, cujo abstrai o tratamento de exceções

commit b6fee76
Author: lucas0headshot <[email protected]>
Date:   Tue Mar 19 23:51:30 2024 -0300

    feat: add exceptions

    Adicionar ValidationException & BusinessException

commit a68ca8e
Author: lucas0headshot <[email protected]>
Date:   Tue Mar 19 23:46:34 2024 -0300

    feat: add healthCheckController

    Adicionar healthCheck p/ checar se App tá rodando usando a rota "health"

commit e38eba9
Author: lucas0headshot <[email protected]>
Date:   Tue Mar 19 23:35:05 2024 -0300

    Squashed commit of the following:

    commit 5cd3128
    Author: JuannCarloss <[email protected]>
    Date:   Tue Mar 19 23:29:37 2024 -0300

        feat: implementando função de paginação

    commit 632e932
    Author: JuannCarloss <[email protected]>
    Date:   Tue Mar 19 22:54:18 2024 -0300

        feat: implementando paginação e alterando rota no ResponseEntity do postMapping

    commit 9d4784a
    Author: JuannCarloss <[email protected]>
    Date:   Tue Mar 19 22:53:27 2024 -0300

        feat: implementando metodo de alterar avaliacao e metodo de paginação

    commit 1056455
    Author: JuannCarloss <[email protected]>
    Date:   Tue Mar 19 22:46:55 2024 -0300

        fix: arrumando rota do ResponseEntity dentro do postMapping

    commit 4d23b91
    Author: JuannCarloss <[email protected]>
    Date:   Tue Mar 19 22:46:17 2024 -0300

        fix: arrumando rota do RequestMapping

    commit c93f2f9
    Author: JuannCarloss <[email protected]>
    Date:   Tue Mar 19 22:45:43 2024 -0300

        feat: implementando RequestMapping

    commit d85eaf3
    Author: JuannCarloss <[email protected]>
    Date:   Tue Mar 19 22:45:09 2024 -0300

        feat: paginação da requisição de listar todos os cargos

    commit 1dba965
    Author: JuannCarloss <[email protected]>
    Date:   Tue Mar 19 22:44:38 2024 -0300

        feat: paginação da requisição de listar todas as aulas

    commit c6475f1
    Author: lucas0headshot <[email protected]>
    Date:   Tue Mar 19 00:28:54 2024 -0300

        Squashed commit of the following:

        commit 8de12a9
        Author: lucas0headshot <[email protected]>
        Date:   Tue Mar 19 00:27:42 2024 -0300

            build: upd versão Java no pom.xml

            Atualizar do Java 17 pro 21

        commit ada4871
        Author: lucas0headshot <[email protected]>
        Date:   Mon Mar 18 23:47:45 2024 -0300

            fix: upd anotações p/ resolver bug "JDBCTypeException"

            Atualizar e anotar todas as Classes presentes no projeto

        commit 3735817
        Author: lucas0headshot <[email protected]>
        Date:   Mon Mar 18 00:40:58 2024 -0300

            fix: exception JDBCType ao tentar Buildar

        commit 2a45ce7
        Author: lucas0headshot <[email protected]>
        Date:   Mon Mar 11 21:23:39 2024 -0300

            feat: add classe Chamada

            Adicionar classe Chamada

        commit 86a708b
        Author: lucas0headshot <[email protected]>
        Date:   Mon Mar 11 21:23:18 2024 -0300

            feat: add e upd anotações classes

            Adicionar e atualizar anotações nas classes Curso, Funcionario, Materia e Turma

        commit 46a7a25
        Author: lucas0headshot <[email protected]>
        Date:   Fri Mar 8 00:58:19 2024 -0300

            refactor: upd login-page

            Alterar HTML, CSS e JS da login-page

        commit 4608b21
        Author: lucas0headshot <[email protected]>
        Date:   Thu Mar 7 00:38:02 2024 -0300

            refactor: upd HTML, CSS & JS da Login-Page

        commit c9f0bdf
        Author: lucas0headshot <[email protected]>
        Date:   Wed Mar 6 23:23:45 2024 -0300

            Squashed commit of the following:

            commit f176d36
            Merge: 8a810a1 510d2af
            Author: lucas0headshot <[email protected]>
            Date:   Wed Mar 6 23:22:59 2024 -0300

                Merge branch 'main' into dev

            commit 510d2af
            Author: lucas0headshot <[email protected]>
            Date:   Wed Mar 6 23:21:57 2024 -0300

                fix: del artefato "<<<<" na classe Funcionario

                Remover artefato do comentário gerado pelo Git ao tentar resolver conflito de merge

            commit 8a810a1
            Merge: b2a9439 fdffa05
            Author: Lucas Ronchi <[email protected]>
            Date:   Sun Mar 3 19:30:13 2024 -0300

                Merge pull request #4 from lucas0headshot/gabriel

                Estrutura

            commit fdffa05
            Author: Carrerogabriel <[email protected]>
            Date:   Sun Mar 3 19:15:53 2024 -0300

                Controllers, Services e Repositorys, estruturando classes

            commit a34519f
            Author: Carrerogabriel <[email protected]>
            Date:   Sun Mar 3 19:12:55 2024 -0300

                Estrutura

                estrutura

            commit c14cc40
            Author: lucas0headshot <[email protected]>
            Date:   Sun Mar 3 02:47:29 2024 -0300

                doc: upd GS_SENAC.zip

                Atualizar diagrama de classes

            commit 14afd08
            Author: lucas0headshot <[email protected]>
            Date:   Sun Mar 3 02:21:04 2024 -0300

                docs: upd README

                Renomear seção "Authores" -> "Autores", pequena correção ortográfica

            commit 9254031
            Author: lucas0headshot <[email protected]>
            Date:   Sun Mar 3 02:19:57 2024 -0300

                docs: upd README

                Remover nomes tecnologias & renomear seção "Contribuidores" -> "Autores"

            commit 4dd54ba
            Author: lucas0headshot <[email protected]>
            Date:   Sun Mar 3 02:16:25 2024 -0300

                docs: upd README

                Atualizar README raiz

            commit 156f3ef
            Author: lucas0headshot <[email protected]>
            Date:   Sat Mar 2 22:54:34 2024 -0300

                raw: add pull_request_template.md

                Adicionar arquivo de template e configuração p/ Pull Request

            commit b634660
            Author: lucas0headshot <[email protected]>
            Date:   Sat Mar 2 22:53:56 2024 -0300

                raw: del pasta .idea

                Remover pasta .idea na raiz do repositório

        commit c002257
        Author: lucas0headshot <[email protected]>
        Date:   Mon Mar 4 21:48:30 2024 -0300

            refactor: upd base front-end

            Adiciona dependência do JQuery e Bootstrap

        commit 809fa04
        Author: lucas0headshot <[email protected]>
        Date:   Sun Mar 3 03:02:20 2024 -0300

            feat: add classe "Feedback"

            Adicionar classe Feedback.
            Cuja será usada para que os alunos avaliem cursos, turmas, matérias, aulas e etc

        commit b6c4cbb
        Author: lucas0headshot <[email protected]>
        Date:   Sun Mar 3 03:01:30 2024 -0300

            refactor: upd atributo "professor" classe "Avaliacao"

            Alterar atributo "professor" para "materia".
            Tendo em vista que o aluno será avaliado por matéria

        commit 0b0e9dc
        Merge: 1e94fc7 b2a9439
        Author: lucas0headshot <[email protected]>
        Date:   Sat Mar 2 18:49:21 2024 -0300

            Merge branch 'main' into lucas

        commit 1e94fc7
        Author: lucas0headshot <[email protected]>
        Date:   Fri Mar 1 21:57:30 2024 -0300

            feat: add estrutura básica login page

            Adicionar estrutura básica

    commit bc9abe4
    Author: lucas0headshot <[email protected]>
    Date:   Mon Mar 18 23:49:50 2024 -0300

        Squashed commit of the following:

        commit ada4871
        Author: lucas0headshot <[email protected]>
        Date:   Mon Mar 18 23:47:45 2024 -0300

            fix: upd anotações p/ resolver bug "JDBCTypeException"

            Atualizar e anotar todas as Classes presentes no projeto

        commit 3735817
        Author: lucas0headshot <[email protected]>
        Date:   Mon Mar 18 00:40:58 2024 -0300

            fix: exception JDBCType ao tentar Buildar

        commit 2a45ce7
        Author: lucas0headshot <[email protected]>
        Date:   Mon Mar 11 21:23:39 2024 -0300

            feat: add classe Chamada

            Adicionar classe Chamada

        commit 86a708b
        Author: lucas0headshot <[email protected]>
        Date:   Mon Mar 11 21:23:18 2024 -0300

            feat: add e upd anotações classes

            Adicionar e atualizar anotações nas classes Curso, Funcionario, Materia e Turma

        commit 46a7a25
        Author: lucas0headshot <[email protected]>
        Date:   Fri Mar 8 00:58:19 2024 -0300

            refactor: upd login-page

            Alterar HTML, CSS e JS da login-page

        commit 4608b21
        Author: lucas0headshot <[email protected]>
        Date:   Thu Mar 7 00:38:02 2024 -0300

            refactor: upd HTML, CSS & JS da Login-Page

        commit c9f0bdf
        Author: lucas0headshot <[email protected]>
        Date:   Wed Mar 6 23:23:45 2024 -0300

            Squashed commit of the following:

            commit f176d36
            Merge: 8a810a1 510d2af
            Author: lucas0headshot <[email protected]>
            Date:   Wed Mar 6 23:22:59 2024 -0300

                Merge branch 'main' into dev

            commit 510d2af
            Author: lucas0headshot <[email protected]>
            Date:   Wed Mar 6 23:21:57 2024 -0300

                fix: del artefato "<<<<" na classe Funcionario

                Remover artefato do comentário gerado pelo Git ao tentar resolver conflito de merge

            commit 8a810a1
            Merge: b2a9439 fdffa05
            Author: Lucas Ronchi <[email protected]>
            Date:   Sun Mar 3 19:30:13 2024 -0300

                Merge pull request #4 from lucas0headshot/gabriel

                Estrutura

            commit fdffa05
            Author: Carrerogabriel <[email protected]>
            Date:   Sun Mar 3 19:15:53 2024 -0300

                Controllers, Services e Repositorys, estruturando classes

            commit a34519f
            Author: Carrerogabriel <[email protected]>
            Date:   Sun Mar 3 19:12:55 2024 -0300

                Estrutura

                estrutura

            commit c14cc40
            Author: lucas0headshot <[email protected]>
            Date:   Sun Mar 3 02:47:29 2024 -0300

                doc: upd GS_SENAC.zip

                Atualizar diagrama de classes

            commit 14afd08
            Author: lucas0headshot <[email protected]>
            Date:   Sun Mar 3 02:21:04 2024 -0300

                docs: upd README

                Renomear seção "Authores" -> "Autores", pequena correção ortográfica

            commit 9254031
            Author: lucas0headshot <[email protected]>
            Date:   Sun Mar 3 02:19:57 2024 -0300

                docs: upd README

                Remover nomes tecnologias & renomear seção "Contribuidores" -> "Autores"

            commit 4dd54ba
            Author: lucas0headshot <[email protected]>
            Date:   Sun Mar 3 02:16:25 2024 -0300

                docs: upd README

                Atualizar README raiz

            commit 156f3ef
            Author: lucas0headshot <[email protected]>
            Date:   Sat Mar 2 22:54:34 2024 -0300

                raw: add pull_request_template.md

                Adicionar arquivo de template e configuração p/ Pull Request

            commit b634660
            Author: lucas0headshot <[email protected]>
            Date:   Sat Mar 2 22:53:56 2024 -0300

                raw: del pasta .idea

                Remover pasta .idea na raiz do repositório

        commit c002257
        Author: lucas0headshot <[email protected]>
        Date:   Mon Mar 4 21:48:30 2024 -0300

            refactor: upd base front-end

            Adiciona dependência do JQuery e Bootstrap

        commit 809fa04
        Author: lucas0headshot <[email protected]>
        Date:   Sun Mar 3 03:02:20 2024 -0300

            feat: add classe "Feedback"

            Adicionar classe Feedback.
            Cuja será usada para que os alunos avaliem cursos, turmas, matérias, aulas e etc

        commit b6c4cbb
        Author: lucas0headshot <[email protected]>
        Date:   Sun Mar 3 03:01:30 2024 -0300

            refactor: upd atributo "professor" classe "Avaliacao"

            Alterar atributo "professor" para "materia".
            Tendo em vista que o aluno será avaliado por matéria

        commit 0b0e9dc
        Merge: 1e94fc7 b2a9439
        Author: lucas0headshot <[email protected]>
        Date:   Sat Mar 2 18:49:21 2024 -0300

            Merge branch 'main' into lucas

        commit 1e94fc7
        Author: lucas0headshot <[email protected]>
        Date:   Fri Mar 1 21:57:30 2024 -0300

            feat: add estrutura básica login page

            Adicionar estrutura básica

    commit 3c92279
    Author: lucas0headshot <[email protected]>
    Date:   Mon Mar 11 21:24:05 2024 -0300

        Squashed commit of the following:

        commit 2a45ce7
        Author: lucas0headshot <[email protected]>
        Date:   Mon Mar 11 21:23:39 2024 -0300

            feat: add classe Chamada

            Adicionar classe Chamada

        commit 86a708b
        Author: lucas0headshot <[email protected]>
        Date:   Mon Mar 11 21:23:18 2024 -0300

            feat: add e upd anotações classes

            Adicionar e atualizar anotações nas classes Curso, Funcionario, Materia e Turma

        commit 46a7a25
        Author: lucas0headshot <[email protected]>
        Date:   Fri Mar 8 00:58:19 2024 -0300

            refactor: upd login-page

            Alterar HTML, CSS e JS da login-page

        commit 4608b21
        Author: lucas0headshot <[email protected]>
        Date:   Thu Mar 7 00:38:02 2024 -0300

            refactor: upd HTML, CSS & JS da Login-Page

        commit c9f0bdf
        Author: lucas0headshot <[email protected]>
        Date:   Wed Mar 6 23:23:45 2024 -0300

            Squashed commit of the following:

            commit f176d36
            Merge: 8a810a1 510d2af
            Author: lucas0headshot <[email protected]>
            Date:   Wed Mar 6 23:22:59 2024 -0300

                Merge branch 'main' into dev

            commit 510d2af
            Author: lucas0headshot <[email protected]>
            Date:   Wed Mar 6 23:21:57 2024 -0300

                fix: del artefato "<<<<" na classe Funcionario

                Remover artefato do comentário gerado pelo Git ao tentar resolver conflito de merge

            commit 8a810a1
            Merge: b2a9439 fdffa05
            Author: Lucas Ronchi <[email protected]>
            Date:   Sun Mar 3 19:30:13 2024 -0300

                Merge pull request #4 from lucas0headshot/gabriel

                Estrutura

            commit fdffa05
            Author: Carrerogabriel <[email protected]>
            Date:   Sun Mar 3 19:15:53 2024 -0300

                Controllers, Services e Repositorys, estruturando classes

            commit a34519f
            Author: Carrerogabriel <[email protected]>
            Date:   Sun Mar 3 19:12:55 2024 -0300

                Estrutura

                estrutura

            commit c14cc40
            Author: lucas0headshot <[email protected]>
            Date:   Sun Mar 3 02:47:29 2024 -0300

                doc: upd GS_SENAC.zip

                Atualizar diagrama de classes

            commit 14afd08
            Author: lucas0headshot <[email protected]>
            Date:   Sun Mar 3 02:21:04 2024 -0300

                docs: upd README

                Renomear seção "Authores" -> "Autores", pequena correção ortográfica

            commit 9254031
            Author: lucas0headshot <[email protected]>
            Date:   Sun Mar 3 02:19:57 2024 -0300

                docs: upd README

                Remover nomes tecnologias & renomear seção "Contribuidores" -> "Autores"

            commit 4dd54ba
            Author: lucas0headshot <[email protected]>
            Date:   Sun Mar 3 02:16:25 2024 -0300

                docs: upd README

                Atualizar README raiz

            commit 156f3ef
            Author: lucas0headshot <[email protected]>
            Date:   Sat Mar 2 22:54:34 2024 -0300

                raw: add pull_request_template.md

                Adicionar arquivo de template e configuração p/ Pull Request

            commit b634660
            Author: lucas0headshot <[email protected]>
            Date:   Sat Mar 2 22:53:56 2024 -0300

                raw: del pasta .idea

                Remover pasta .idea na raiz do repositório

        commit c002257
        Author: lucas0headshot <[email protected]>
        Date:   Mon Mar 4 21:48:30 2024 -0300

            refactor: upd base front-end

            Adiciona dependência do JQuery e Bootstrap

        commit 809fa04
        Author: lucas0headshot <[email protected]>
        Date:   Sun Mar 3 03:02:20 2024 -0300

            feat: add classe "Feedback"

            Adicionar classe Feedback.
            Cuja será usada para que os alunos avaliem cursos, turmas, matérias, aulas e etc

        commit b6c4cbb
        Author: lucas0headshot <[email protected]>
        Date:   Sun Mar 3 03:01:30 2024 -0300

            refactor: upd atributo "professor" classe "Avaliacao"

            Alterar atributo "professor" para "materia".
            Tendo em vista que o aluno será avaliado por matéria

        commit 0b0e9dc
        Merge: 1e94fc7 b2a9439
        Author: lucas0headshot <[email protected]>
        Date:   Sat Mar 2 18:49:21 2024 -0300

            Merge branch 'main' into lucas

        commit 1e94fc7
        Author: lucas0headshot <[email protected]>
        Date:   Fri Mar 1 21:57:30 2024 -0300

            feat: add estrutura básica login page

            Adicionar estrutura básica

    commit f176d36
    Merge: 8a810a1 510d2af
    Author: lucas0headshot <[email protected]>
    Date:   Wed Mar 6 23:22:59 2024 -0300

        Merge branch 'main' into dev

    commit 8a810a1
    Merge: b2a9439 fdffa05
    Author: Lucas Ronchi <[email protected]>
    Date:   Sun Mar 3 19:30:13 2024 -0300

        Merge pull request #4 from lucas0headshot/gabriel

        Estrutura

    commit fdffa05
    Author: Carrerogabriel <[email protected]>
    Date:   Sun Mar 3 19:15:53 2024 -0300

        Controllers, Services e Repositorys, estruturando classes

    commit a34519f
    Author: Carrerogabriel <[email protected]>
    Date:   Sun Mar 3 19:12:55 2024 -0300

        Estrutura

        estrutura

commit 5cd3128
Author: JuannCarloss <[email protected]>
Date:   Tue Mar 19 23:29:37 2024 -0300

    feat: implementando função de paginação

commit 632e932
Author: JuannCarloss <[email protected]>
Date:   Tue Mar 19 22:54:18 2024 -0300

    feat: implementando paginação e alterando rota no ResponseEntity do postMapping

commit 9d4784a
Author: JuannCarloss <[email protected]>
Date:   Tue Mar 19 22:53:27 2024 -0300

    feat: implementando metodo de alterar avaliacao e metodo de paginação

commit 1056455
Author: JuannCarloss <[email protected]>
Date:   Tue Mar 19 22:46:55 2024 -0300

    fix: arrumando rota do ResponseEntity dentro do postMapping

commit 4d23b91
Author: JuannCarloss <[email protected]>
Date:   Tue Mar 19 22:46:17 2024 -0300

    fix: arrumando rota do RequestMapping

commit c93f2f9
Author: JuannCarloss <[email protected]>
Date:   Tue Mar 19 22:45:43 2024 -0300

    feat: implementando RequestMapping

commit d85eaf3
Author: JuannCarloss <[email protected]>
Date:   Tue Mar 19 22:45:09 2024 -0300

    feat: paginação da requisição de listar todos os cargos

commit 1dba965
Author: JuannCarloss <[email protected]>
Date:   Tue Mar 19 22:44:38 2024 -0300

    feat: paginação da requisição de listar todas as aulas

commit 14b8c43
Author: lucas0headshot <[email protected]>
Date:   Tue Mar 19 01:07:55 2024 -0300

    chore: add schema.sql

    Adicionar schema.sql

commit 6def352
Merge: 8de12a9 b09e922
Author: lucas0headshot <[email protected]>
Date:   Tue Mar 19 00:29:59 2024 -0300

    Merge branch 'main' into lucas

commit c6475f1
Author: lucas0headshot <[email protected]>
Date:   Tue Mar 19 00:28:54 2024 -0300

    Squashed commit of the following:

    commit 8de12a9
    Author: lucas0headshot <[email protected]>
    Date:   Tue Mar 19 00:27:42 2024 -0300

        build: upd versão Java no pom.xml

        Atualizar do Java 17 pro 21

    commit ada4871
    Author: lucas0headshot <[email protected]>
    Date:   Mon Mar 18 23:47:45 2024 -0300

        fix: upd anotações p/ resolver bug "JDBCTypeException"

        Atualizar e anotar todas as Classes presentes no projeto

    commit 3735817
    Author: lucas0headshot <[email protected]>
    Date:   Mon Mar 18 00:40:58 2024 -0300

        fix: exception JDBCType ao tentar Buildar

    commit 2a45ce7
    Author: lucas0headshot <[email protected]>
    Date:   Mon Mar 11 21:23:39 2024 -0300

        feat: add classe Chamada

        Adicionar classe Chamada

    commit 86a708b
    Author: lucas0headshot <[email protected]>
    Date:   Mon Mar 11 21:23:18 2024 -0300

        feat: add e upd anotações classes

        Adicionar e atualizar anotações nas classes Curso, Funcionario, Materia e Turma

    commit 46a7a25
    Author: lucas0headshot <[email protected]>
    Date:   Fri Mar 8 00:58:19 2024 -0300

        refactor: upd login-page

        Alterar HTML, CSS e JS da login-page

    commit 4608b21
    Author: lucas0headshot <[email protected]>
    Date:   Thu Mar 7 00:38:02 2024 -0300

        refactor: upd HTML, CSS & JS da Login-Page

    commit c9f0bdf
    Author: lucas0headshot <[email protected]>
    Date:   Wed Mar 6 23:23:45 2024 -0300

        Squashed commit of the following:

        commit f176d36
        Merge: 8a810a1 510d2af
        Author: lucas0headshot <[email protected]>
        Date:   Wed Mar 6 23:22:59 2024 -0300

            Merge branch 'main' into dev

        commit 510d2af
        Author: lucas0headshot <[email protected]>
        Date:   Wed Mar 6 23:21:57 2024 -0300

            fix: del artefato "<<<<" na classe Funcionario

            Remover artefato do comentário gerado pelo Git ao tentar resolver conflito de merge

        commit 8a810a1
        Merge: b2a9439 fdffa05
        Author: Lucas Ronchi <[email protected]>
        Date:   Sun Mar 3 19:30:13 2024 -0300

            Merge pull request #4 from lucas0headshot/gabriel

            Estrutura

        commit fdffa05
        Author: Carrerogabriel <[email protected]>
        Date:   Sun Mar 3 19:15:53 2024 -0300

            Controllers, Services e Repositorys, estruturando classes

        commit a34519f
        Author: Carrerogabriel <[email protected]>
        Date:   Sun Mar 3 19:12:55 2024 -0300

            Estrutura

            estrutura

        commit c14cc40
        Author: lucas0headshot <[email protected]>
        Date:   Sun Mar 3 02:47:29 2024 -0300

            doc: upd GS_SENAC.zip

            Atualizar diagrama de classes

        commit 14afd08
        Author: lucas0headshot <[email protected]>
        Date:   Sun Mar 3 02:21:04 2024 -0300

            docs: upd README

            Renomear seção "Authores" -> "Autores", pequena correção ortográfica

        commit 9254031
        Author: lucas0headshot <[email protected]>
        Date:   Sun Mar 3 02:19:57 2024 -0300

            docs: upd README

            Remover nomes tecnologias & renomear seção "Contribuidores" -> "Autores"

        commit 4dd54ba
        Author: lucas0headshot <[email protected]>
        Date:   Sun Mar 3 02:16:25 2024 -0300

            docs: upd README

            Atualizar README raiz

        commit 156f3ef
        Author: lucas0headshot <[email protected]>
        Date:   Sat Mar 2 22:54:34 2024 -0300

            raw: add pull_request_template.md

            Adicionar arquivo de template e configuração p/ Pull Request

        commit b634660
        Author: lucas0headshot <[email protected]>
        Date:   Sat Mar 2 22:53:56 2024 -0300

            raw: del pasta .idea

            Remover pasta .idea na raiz do repositório

    commit c002257
    Author: lucas0headshot <[email protected]>
    Date:   Mon Mar 4 21:48:30 2024 -0300

        refactor: upd base front-end

        Adiciona dependência do JQuery e Bootstrap

    commit 809fa04
    Author: lucas0headshot <[email protected]>
    Date:   Sun Mar 3 03:02:20 2024 -0300

        feat: add classe "Feedback"

        Adicionar classe Feedback.
        Cuja será usada para que os alunos avaliem cursos, turmas, matérias, aulas e etc

    commit b6c4cbb
    Author: lucas0headshot <[email protected]>
    Date:   Sun Mar 3 03:01:30 2024 -0300

        refactor: upd atributo "professor" classe "Avaliacao"

        Alterar atributo "professor" para "materia".
        Tendo em vista que o aluno será avaliado por matéria

    commit 0b0e9dc
    Merge: 1e94fc7 b2a9439
    Author: lucas0headshot <[email protected]>
    Date:   Sat Mar 2 18:49:21 2024 -0300

        Merge branch 'main' into lucas

    commit 1e94fc7
    Author: lucas0headshot <[email protected]>
    Date:   Fri Mar 1 21:57:30 2024 -0300

        feat: add estrutura básica login page

        Adicionar estrutura básica

commit 8de12a9
Author: lucas0headshot <[email protected]>
Date:   Tue Mar 19 00:27:42 2024 -0300

    build: upd versão Java no pom.xml

    Atualizar do Java 17 pro 21

commit bc9abe4
Author: lucas0headshot <[email protected]>
Date:   Mon Mar 18 23:49:50 2024 -0300

    Squashed commit of the following:

    commit ada4871
    Author: lucas0headshot <[email protected]>
    Date:   Mon Mar 18 23:47:45 2024 -0300

        fix: upd anotações p/ resolver bug "JDBCTypeException"

        Atualizar e anotar todas as Classes presentes no projeto

    commit 3735817
    Author: lucas0headshot <[email protected]>
    Date:   Mon Mar 18 00:40:58 2024 -0300

        fix: exception JDBCType ao tentar Buildar

    commit 2a45ce7
    Author: lucas0headshot <[email protected]>
    Date:   Mon Mar 11 21:23:39 2024 -0300

        feat: add classe Chamada

        Adicionar classe Chamada

    commit 86a708b
    Author: lucas0headshot <[email protected]>
    Date:   Mon Mar 11 21:23:18 2024 -0300

        feat: add e upd anotações classes

        Adicionar e atualizar anotações nas classes Curso, Funcionario, Materia e Turma

    commit 46a7a25
    Author: lucas0headshot <[email protected]>
    Date:   Fri Mar 8 00:58:19 2024 -0300

        refactor: upd login-page

        Alterar HTML, CSS e JS da login-page

    commit 4608b21
    Author: lucas0headshot <[email protected]>
    Date:   Thu Mar 7 00:38:02 2024 -0300

        refactor: upd HTML, CSS & JS da Login-Page

    commit c9f0bdf
    Author: lucas0headshot <[email protected]>
    Date:   Wed Mar 6 23:23:45 2024 -0300

        Squashed commit of the following:

        commit f176d36
        Merge: 8a810a1 510d2af
        Author: lucas0headshot <[email protected]>
        Date:   Wed Mar 6 23:22:59 2024 -0300

            Merge branch 'main' into dev

        commit 510d2af
        Author: lucas0headshot <[email protected]>
        Date:   Wed Mar 6 23:21:57 2024 -0300

            fix: del artefato "<<<<" na classe Funcionario

            Remover artefato do comentário gerado pelo Git ao tentar resolver conflito de merge

        commit 8a810a1
        Merge: b2a9439 fdffa05
        Author: Lucas Ronchi <[email protected]>
        Date:   Sun Mar 3 19:30:13 2024 -0300

            Merge pull request #4 from lucas0headshot/gabriel

            Estrutura

        commit fdffa05
        Author: Carrerogabriel <[email protected]>
        Date:   Sun Mar 3 19:15:53 2024 -0300

            Controllers, Services e Repositorys, estruturando classes

        commit a34519f
        Author: Carrerogabriel <[email protected]>
        Date:   Sun Mar 3 19:12:55 2024 -0300

            Estrutura

            estrutura

        commit c14cc40
        Author: lucas0headshot <[email protected]>
        Date:   Sun Mar 3 02:47:29 2024 -0300

            doc: upd GS_SENAC.zip

            Atualizar diagrama de classes

        commit 14afd08
        Author: lucas0headshot <[email protected]>
        Date:   Sun Mar 3 02:21:04 2024 -0300

            docs: upd README

            Renomear seção "Authores" -> "Autores", pequena correção ortográfica

        commit 9254031
        Author: lucas0headshot <[email protected]>
        Date:   Sun Mar 3 02:19:57 2024 -0300

            docs: upd README

            Remover nomes tecnologias & renomear seção "Contribuidores" -> "Autores"

        commit 4dd54ba
        Author: lucas0headshot <[email protected]>
        Date:   Sun Mar 3 02:16:25 2024 -0300

            docs: upd README

            Atualizar README raiz

        commit 156f3ef
        Author: lucas0headshot <[email protected]>
        Date:   Sat Mar 2 22:54:34 2024 -0300

            raw: add pull_request_template.md

            Adicionar arquivo de template e configuração p/ Pull Request

        commit b634660
        Author: lucas0headshot <[email protected]>
        Date:   Sat Mar 2 22:53:56 2024 -0300

            raw: del pasta .idea

            Remover pasta .idea na raiz do repositório

    commit c002257
    Author: lucas0headshot <[email protected]>
    Date:   Mon Mar 4 21:48:30 2024 -0300

        refactor: upd base front-end

        Adiciona dependência do JQuery e Bootstrap

    commit 809fa04
    Author: lucas0headshot <[email protected]>
    Date:   Sun Mar 3 03:02:20 2024 -0300

        feat: add classe "Feedback"

        Adicionar classe Feedback.
        Cuja será usada para que os alunos avaliem cursos, turmas, matérias, aulas e etc

    commit b6c4cbb
    Author: lucas0headshot <[email protected]>
    Date:   Sun Mar 3 03:01:30 2024 -0300

        refactor: upd atributo "professor" classe "Avaliacao"

        Alterar atributo "professor" para "materia".
        Tendo em vista que o aluno será avaliado por matéria

    commit 0b0e9dc
    Merge: 1e94fc7 b2a9439
    Author: lucas0headshot <[email protected]>
    Date:   Sat Mar 2 18:49:21 2024 -0300

        Merge branch 'main' into lucas

    commit 1e94fc7
    Author: lucas0headshot <[email protected]>
    Date:   Fri Mar 1 21:57:30 2024 -0300

        feat: add estrutura básica login page

        Adicionar estrutura básica

commit ada4871
Author: lucas0headshot <[email protected]>
Date:   Mon Mar 18 23:47:45 2024 -0300

    fix: upd anotações p/ resolver bug "JDBCTypeException"

    Atualizar e anotar todas as Classes presentes no projeto

commit 3735817
Author: lucas0headshot <[email protected]>
Date:   Mon Mar 18 00:40:58 2024 -0300

    fix: exception JDBCType ao tentar Buildar

commit 3c92279
Author: lucas0headshot <[email protected]>
Date:   Mon Mar 11 21:24:05 2024 -0300

    Squashed commit of the following:

    commit 2a45ce7
    Author: lucas0headshot <[email protected]>
    Date:   Mon Mar 11 21:23:39 2024 -0300

        feat: add classe Chamada

        Adicionar classe Chamada

    commit 86a708b
    Author: lucas0headshot <[email protected]>
    Date:   Mon Mar 11 21:23:18 2024 -0300

        feat: add e upd anotações classes

        Adicionar e atualizar anotações nas classes Curso, Funcionario, Materia e Turma

    commit 46a7a25
    Author: lucas0headshot <[email protected]>
    Date:   Fri Mar 8 00:58:19 2024 -0300

        refactor: upd login-page

        Alterar HTML, CSS e JS da login-page

    commit 4608b21
    Author: lucas0headshot <[email protected]>
    Date:   Thu Mar 7 00:38:02 2024 -0300

        refactor: upd HTML, CSS & JS da Login-Page

    commit c9f0bdf
    Author: lucas0headshot <[email protected]>
    Date:   Wed Mar 6 23:23:45 2024 -0300

        Squashed commit of the following:

        commit f176d36
        Merge: 8a810a1 510d2af
        Author: lucas0headshot <[email protected]>
        Date:   Wed Mar 6 23:22:59 2024 -0300

            Merge branch 'main' into dev

        commit 510d2af
        Author: lucas0headshot <[email protected]>
        Date:   Wed Mar 6 23:21:57 2024 -0300

            fix: del artefato "<<<<" na classe Funcionario

            Remover artefato do comentário gerado pelo Git ao tentar resolver conflito de merge

        commit 8a810a1
        Merge: b2a9439 fdffa05
        Author: Lucas Ronchi <[email protected]>
        Date:   Sun Mar 3 19:30:13 2024 -0300

            Merge pull request #4 from lucas0headshot/gabriel

            Estrutura

        commit fdffa05
        Author: Carrerogabriel <[email protected]>
        Date:   Sun Mar 3 19:15:53 2024 -0300

            Controllers, Services e Repositorys, estruturando classes

        commit a34519f
        Author: Carrerogabriel <[email protected]>
        Date:   Sun Mar 3 19:12:55 2024 -0300

            Estrutura

            estrutura

        commit c14cc40
        Author: lucas0headshot <[email protected]>
        Date:   Sun Mar 3 02:47:29 2024 -0300

            doc: upd GS_SENAC.zip

            Atualizar diagrama de classes

        commit 14afd08
        Author: lucas0headshot <[email protected]>
        Date:   Sun Mar 3 02:21:04 2024 -0300

            docs: upd README

            Renomear seção "Authores" -> "Autores", pequena correção ortográfica

        commit 9254031
        Author: lucas0headshot <[email protected]>
        Date:   Sun Mar 3 02:19:57 2024 -0300

            docs: upd README

            Remover nomes tecnologias & renomear seção "Contribuidores" -> "Autores"

        commit 4dd54ba
        Author: lucas0headshot <[email protected]>
        Date:   Sun Mar 3 02:16:25 2024 -0300

            docs: upd README

            Atualizar README raiz

        commit 156f3ef
        Author: lucas0headshot <[email protected]>
        Date:   Sat Mar 2 22:54:34 2024 -0300

            raw: add pull_request_template.md

            Adicionar arquivo de template e configuração p/ Pull Request

        commit b634660
        Author: lucas0headshot <[email protected]>
        Date:   Sat Mar 2 22:53:56 2024 -0300

            raw: del pasta .idea

            Remover pasta .idea na raiz do repositório

    commit c002257
    Author: lucas0headshot <[email protected]>
    Date:   Mon Mar 4 21:48:30 2024 -0300

        refactor: upd base front-end

        Adiciona dependência do JQuery e Bootstrap

    commit 809fa04
    Author: lucas0headshot <[email protected]>
    Date:   Sun Mar 3 03:02:20 2024 -0300

        feat: add classe "Feedback"

        Adicionar classe Feedback.
        Cuja será usada para que os alunos avaliem cursos, turmas, matérias, aulas e etc

    commit b6c4cbb
    Author: lucas0headshot <[email protected]>
    Date:   Sun Mar 3 03:01:30 2024 -0300

        refactor: upd atributo "professor" classe "Avaliacao"

        Alterar atributo "professor" para "materia".
        Tendo em vista que o aluno será avaliado por matéria

    commit 0b0e9dc
    Merge: 1e94fc7 b2a9439
    Author: lucas0headshot <[email protected]>
    Date:   Sat Mar 2 18:49:21 2024 -0300

        Merge branch 'main' into lucas

    commit 1e94fc7
    Author: lucas0headshot <[email protected]>
    Date:   Fri Mar 1 21:57:30 2024 -0300

        feat: add estrutura básica login page

        Adicionar estrutura básica

commit 2a45ce7
Author: lucas0headshot <[email protected]>
Date:   Mon Mar 11 21:23:39 2024 -0300

    feat: add classe Chamada

    Adicionar classe Chamada

commit 86a708b
Author: lucas0headshot <[email protected]>
Date:   Mon Mar 11 21:23:18 2024 -0300

    feat: add e upd anotações classes

    Adicionar e atualizar anotações nas classes Curso, Funcionario, Materia e Turma

commit 46a7a25
Author: lucas0headshot <[email protected]>
Date:   Fri Mar 8 00:58:19 2024 -0300

    refactor: upd login-page

    Alterar HTML, CSS e JS da login-page

commit 4608b21
Author: lucas0headshot <[email protected]>
Date:   Thu Mar 7 00:38:02 2024 -0300

    refactor: upd HTML, CSS & JS da Login-Page

commit c9f0bdf
Author: lucas0headshot <[email protected]>
Date:   Wed Mar 6 23:23:45 2024 -0300

    Squashed commit of the following:

    commit f176d36
    Merge: 8a810a1 510d2af
    Author: lucas0headshot <[email protected]>
    Date:   Wed Mar 6 23:22:59 2024 -0300

        Merge branch 'main' into dev

    commit 510d2af
    Author: lucas0headshot <[email protected]>
    Date:   Wed Mar 6 23:21:57 2024 -0300

        fix: del artefato "<<<<" na classe Funcionario

        Remover artefato do comentário gerado pelo Git ao tentar resolver conflito de merge

    commit 8a810a1
    Merge: b2a9439 fdffa05
    Author: Lucas Ronchi <[email protected]>
    Date:   Sun Mar 3 19:30:13 2024 -0300

        Merge pull request #4 from lucas0headshot/gabriel

        Estrutura

    commit fdffa05
    Author: Carrerogabriel <[email protected]>
    Date:   Sun Mar 3 19:15:53 2024 -0300

        Controllers, Services e Repositorys, estruturando classes

    commit a34519f
    Author: Carrerogabriel <[email protected]>
    Date:   Sun Mar 3 19:12:55 2024 -0300

        Estrutura

        estrutura

    commit c14cc40
    Author: lucas0headshot <[email protected]>
    Date:   Sun Mar 3 02:47:29 2024 -0300

        doc: upd GS_SENAC.zip

        Atualizar diagrama de classes

    commit 14afd08
    Author: lucas0headshot <[email protected]>
    Date:   Sun Mar 3 02:21:04 2024 -0300

        docs: upd README

        Renomear seção "Authores" -> "Autores", pequena correção ortográfica

    commit 9254031
    Author: lucas0headshot <[email protected]>
    Date:   Sun Mar 3 02:19:57 2024 -0300

        docs: upd README

        Remover nomes tecnologias & renomear seção "Contribuidores" -> "Autores"

    commit 4dd54ba
    Author: lucas0headshot <[email protected]>
    Date:   Sun Mar 3 02:16:25 2024 -0300

        docs: upd README

        Atualizar README raiz

    commit 156f3ef
    Author: lucas0headshot <[email protected]>
    Date:   Sat Mar 2 22:54:34 2024 -0300

        raw: add pull_request_template.md

        Adicionar arquivo de template e configuração p/ Pull Request

    commit b634660
    Author: lucas0headshot <[email protected]>
    Date:   Sat Mar 2 22:53:56 2024 -0300

        raw: del pasta .idea

        Remover pasta .idea na raiz do repositório

commit f176d36
Merge: 8a810a1 510d2af
Author: lucas0headshot <[email protected]>
Date:   Wed Mar 6 23:22:59 2024 -0300

    Merge branch 'main' into dev

commit c002257
Author: lucas0headshot <[email protected]>
Date:   Mon Mar 4 21:48:30 2024 -0300

    refactor: upd base front-end

    Adiciona dependência do JQuery e Bootstrap

commit 8a810a1
Merge: b2a9439 fdffa05
Author: Lucas Ronchi <[email protected]>
Date:   Sun Mar 3 19:30:13 2024 -0300

    Merge pull request #4 from lucas0headshot/gabriel

    Estrutura

commit 809fa04
Author: lucas0headshot <[email protected]>
Date:   Sun Mar 3 03:02:20 2024 -0300

    feat: add classe "Feedback"

    Adicionar classe Feedback.
    Cuja será usada para que os alunos avaliem cursos, turmas, matérias, aulas e etc

commit b6c4cbb
Author: lucas0headshot <[email protected]>
Date:   Sun Mar 3 03:01:30 2024 -0300

    refactor: upd atributo "professor" classe "Avaliacao"

    Alterar atributo "professor" para "materia".
    Tendo em vista que o aluno será avaliado por matéria

commit 0b0e9dc
Merge: 1e94fc7 b2a9439
Author: lucas0headshot <[email protected]>
Date:   Sat Mar 2 18:49:21 2024 -0300

    Merge branch 'main' into lucas

commit 1e94fc7
Author: lucas0headshot <[email protected]>
Date:   Fri Mar 1 21:57:30 2024 -0300

    feat: add estrutura básica login page

    Adicionar estrutura básica
  • Loading branch information
lucas0headshot committed Mar 20, 2024
1 parent 82c15ad commit c14073a
Show file tree
Hide file tree
Showing 40 changed files with 552 additions and 167 deletions.
12 changes: 12 additions & 0 deletions backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>7.0.2.Final</version>
</dependency>

<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>2.0.1.Final</version>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.senac.gestaocurso.enterprise.exception;



import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;



@ResponseStatus(HttpStatus.CONFLICT)
public class BusinessException extends RuntimeException {
public BusinessException(String msg) {
super(msg);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.senac.gestaocurso.enterprise.exception;



import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;



@ResponseStatus(HttpStatus.UNPROCESSABLE_ENTITY)
public class ValidationException extends RuntimeException {
public ValidationException(String msg) {
super(msg);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.senac.gestaocurso.health;



import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;



@RestController
public class HealthCheckController {
@GetMapping("/health")
public String healthCheck() {
return "Aplicação está rodando";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@


import jakarta.persistence.*;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import java.time.LocalDate;


Expand All @@ -22,6 +23,8 @@ public class Avaliacao extends EntityID {
private String nome;

@Column
@Min(value = 0, message = "A nota deve ser no mínimo 0")
@Max(value = 10, message = "A nota deve ser no máximo 10")
private Integer nota;

@Column
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@



import jakarta.persistence.*;
import org.hibernate.validator.constraints.br.CPF;
import org.hibernate.validator.constraints.br.TituloEleitoral;
import javax.validation.constraints.Email;
import com.senac.gestaocurso.enums.*;
import jakarta.persistence.*;
import java.time.LocalDate;
Expand All @@ -17,6 +21,7 @@ public class Funcionario extends EntityID {
private String nome;

@Column
@CPF(message = "Informe um CPF válido")
private String cpf;

@Column
Expand Down Expand Up @@ -44,6 +49,7 @@ public class Funcionario extends EntityID {
private EstadoCivil estadoCivil;

@Column
@TituloEleitoral(message = "Informe um título de eleitor válido")
private String tituloEleitor;

@Column
Expand All @@ -59,6 +65,7 @@ public class Funcionario extends EntityID {
private String registroProfissional;

@Column
@Email(message = "Informe um e-mail válido")
private String email;

@Column
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class Inscricao extends EntityID {
@JoinColumn(name = "turma_id")
private Turma turma;


public Turma getTurma() {
return turma;
}
Expand All @@ -42,6 +43,13 @@ public Inscricao() {
}


public Turma getTurma() {
return turma;
}

public void setTurma(Turma turma) {
this.turma = turma;
}

public Funcionario getInscrito() {
return inscrito;
Expand Down
17 changes: 15 additions & 2 deletions backend/src/main/java/com/senac/gestaocurso/models/Turma.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public class Turma extends EntityID {
@OneToMany(mappedBy = "turma", cascade = CascadeType.ALL, orphanRemoval = true)
private List<Inscricao> inscritos = new ArrayList<>();

@Column
private Integer limiteQtdInscricao;


public Turma() {
Expand Down Expand Up @@ -86,15 +88,26 @@ public void setCurso(Curso curso) {
this.curso = curso;
}

public Integer getLimiteQtdInscricao() {
return limiteQtdInscricao;
}

public void setLimiteQtdInscricao(Integer limiteQtdInscricao) {
this.limiteQtdInscricao = limiteQtdInscricao;
}



@Override
public String toString() {
return "Turma{" +
"nomeTurma='" + nome + '\'' +
", inscritos=" + inscritos +
"curso=" + curso +
", nome='" + nome + '\'' +
", dataInicio=" + dataInicio +
", dataFinal=" + dataFinal +
", descricao='" + descricao + '\'' +
", inscritos=" + inscritos +
", limiteQtdInscricao=" + limiteQtdInscricao +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

@Repository
public interface FuncionarioRepository extends JpaRepository <Funcionario, Long> {
Optional<Funcionario> findByCpf(String cpf);
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
package com.senac.gestaocurso.repository;



import com.senac.gestaocurso.models.Inscricao;
import com.senac.gestaocurso.models.Turma;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Service;
import org.springframework.stereotype.Repository;

import java.util.List;



@Service
@Repository
public interface InscricaoRepository extends JpaRepository<Inscricao, Long> {
}
List<Inscricao> findAllByTurma(Turma turma);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package com.senac.gestaocurso.resource;



import com.senac.gestaocurso.enterprise.exception.BusinessException;
import com.senac.gestaocurso.enterprise.exception.ValidationException;
import org.springframework.http.HttpStatus;
import org.springframework.validation.FieldError;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseStatus;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;



abstract public class AbstractController {
@ResponseStatus(HttpStatus.BAD_REQUEST)
@ExceptionHandler(MethodArgumentNotValidException.class)
public Map<String, String> handleValidationExceptions(MethodArgumentNotValidException ex) {
Map<String, String> errors = new HashMap<>();
List<String> collect = ex.getBindingResult()
.getAllErrors().stream()
.map(p -> ((FieldError) p).getField() + " "
+ p.getDefaultMessage())
.collect(Collectors.toList());
errors.put("erro", collect.toString());

return errors;
}



@ResponseStatus(HttpStatus.UNPROCESSABLE_ENTITY)
@ExceptionHandler(ValidationException.class)
public Map<String, String> handleValidationExceptions(ValidationException ex) {
Map<String, String> errors = new HashMap<>();
errors.put("erro", ex.getMessage());

return errors;
}



@ResponseStatus(HttpStatus.CONFLICT)
@ExceptionHandler(BusinessException.class)
public Map<String, String> handleBusinessExceptions(ValidationException ex) {
Map<String, String> errors = new HashMap<>();
errors.put("erro", ex.getMessage());

return errors;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
import com.senac.gestaocurso.models.Aula;
import com.senac.gestaocurso.service.AulaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.net.URI;
Expand All @@ -11,20 +14,21 @@

@RestController
@RequestMapping("/api/aulas")
public class AulaController {
public class AulaController extends AbstractController {
@Autowired
private AulaService aulaService;

@PostMapping()
public ResponseEntity salvar(@RequestBody Aula aulas){
Aula save = aulaService.salvar(aulas);
return ResponseEntity.created(URI.create("/aula/salvar" + aulas.getId())).body(save);
return ResponseEntity.created(URI.create("/api/aulas" + aulas.getId())).body(save);
}


@GetMapping
public ResponseEntity findAll() {
List<Aula> aulas = aulaService.buscaTodos();
public ResponseEntity findAll(@RequestParam(defaultValue = "0") int page, @RequestParam(defaultValue = "10") int size) {
Pageable pageable = PageRequest.of(page, size);
Page<Aula> aulas = aulaService.buscaTodos(pageable);
return ResponseEntity.ok(aulas);
}
@GetMapping("/{id}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
import com.senac.gestaocurso.models.Avaliacao;
import com.senac.gestaocurso.service.AvaliacaoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

Expand All @@ -12,36 +15,38 @@

@RestController
@RequestMapping("/api/avaliacao")
public class AvaliacaoController {
public class FuncionarioController {
@Autowired
private AvaliacaoService avaliacaoService;

@PostMapping()
public ResponseEntity salvar(@RequestBody Avaliacao avaliacoes) {
Avaliacao save = avaliacaoService.salvar(avaliacoes);
return ResponseEntity.created(URI.create("/avaliacoes/salvar" + avaliacoes.getId())).body(save);
}


@GetMapping
public ResponseEntity findAll() {
List<Avaliacao> avaliacoes = avaliacaoService.buscaTodos();
return ResponseEntity.ok(avaliacoes);
}

@GetMapping("/{id}")
public ResponseEntity findById(@PathVariable("id") Long id) {
Avaliacao avaliacao = avaliacaoService.buscaPorId(id);
return ResponseEntity.ok().body(avaliacao);
}


@DeleteMapping("{id}")
public ResponseEntity remove(@PathVariable("id") Long id) {
avaliacaoService.remover(id);
return ResponseEntity.noContent().build();
}
public class AvaliacaoController extends AbstractController {
@Autowired
private AvaliacaoService avaliacaoService;



@PostMapping()
public ResponseEntity salvar(@RequestBody Avaliacao avaliacoes) {
Avaliacao save = avaliacaoService.salvar(avaliacoes);
return ResponseEntity.created(URI.create("/api/avaliacao" + avaliacoes.getId())).body(save);
}


@GetMapping
public ResponseEntity findAll(@RequestParam(defaultValue = "0") int page, @RequestParam(defaultValue = "10") int size) {
Pageable pageable = PageRequest.of(page, size);
Page<Avaliacao> avaliacoes = avaliacaoService.buscaTodos(pageable);
return ResponseEntity.ok(avaliacoes);
}

@GetMapping("/{id}")
public ResponseEntity findById(@PathVariable("id") Long id) {
Avaliacao avaliacao = avaliacaoService.buscaPorId(id);
return ResponseEntity.ok().body(avaliacao);
}


@DeleteMapping("{id}")
public ResponseEntity remove(@PathVariable("id") Long id) {
avaliacaoService.remover(id);
return ResponseEntity.noContent().build();
}

/**
* Reparar classe Avaliacao para alterar o service, mapeamento esta certo
Expand All @@ -51,5 +56,4 @@ public ResponseEntity update(@PathVariable("id") Long id, @RequestBody Avaliacao
Avaliacao avaliacao = avaliacaoService.alterar(id, entity);
*/
}
}

}
Loading

0 comments on commit c14073a

Please sign in to comment.