sdec-brasil / old-dashboard

Painel de Controle Público do SDEC
MIT License
3 stars 0 forks source link

Review documentation enums and monetary fields #42

Closed dbeyda closed 5 years ago

dbeyda commented 5 years ago

In our wiki and in our swagger docs, monetary fields are stored as float with two decimal places (we store the R$ quantity). They should be changed to an integer, corresponding to the same total quantity, but stored in cents (R$*100).

Besides that, some Enum fields only have two options: 1 - Yes, 2 - No. When that happens, the field type should be changed to boolean.

dbeyda commented 5 years ago

Wiki Docs:

Swagger Docs:

Database Invoice model:

dbeyda commented 5 years ago

@tloriato I have no idea where to put the "estado" field in the Wiki. Which section should it go in? Any suggestions?

tloriato commented 5 years ago

@dbeyda Which "estado" ?

dbeyda commented 5 years ago

@dbeyda "estado" is an enum holding one of those values: pendente, pago, atrasado, substituido, dados inconsistentes.

tloriato commented 5 years ago

"estado" is an status of an invoice, it should be in its table. each invoice has a single "estado"

dbeyda commented 5 years ago

Added, all good.