pabloxavier / fakebank

Estudos e treinamento de Spring e Serviços
0 stars 0 forks source link

Inclusão de gerente #141

Open pabloxavier opened 5 years ago

pabloxavier commented 5 years ago

Endpoint:

POST /gerentes

Entrada:

{
    cpf: "111.111.111-11",
    nome: "Pedro Almeida",
    dataNascimento: 1980-05-20
}

Saída:

{
    codigo: 1234,
    cpf: "111.111.111-11",
    ativo: true,
    nome: "Pedro Almeida",
    dataNascimento: 1980-05-20
}
pabloxavier commented 5 years ago

Estou usando este json, e está dando erro de INSERT em DBO.GERENTE

{
    "pessoa": {
    "nome": "Juliane Bazilewitz33",
    "tipoPessoa": "FISICA",
    "numeroDocumento": "135769",
    "dataNascimento": "1990-10-10"
    },
   "isAtivo": true
}

Erro:

The INSERT statement conflicted with the CHECK constraint "CK_GERENTE_STATUS".
The conflict occurred in database "DB_FAKE_BANK", table "dbo.GERENTE", column 'IS_ATIVO'.