primeira versão do e-li-nps construido com IA
This commit is contained in:
commit
06950d6e2c
34 changed files with 2524 additions and 0 deletions
40
internal/elinps/models.go
Normal file
40
internal/elinps/models.go
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
package elinps
|
||||
|
||||
import "time"
|
||||
|
||||
type PedidoInput struct {
|
||||
ProdutoNome string `json:"produto_nome"`
|
||||
InquilinoCodigo string `json:"inquilino_codigo"`
|
||||
InquilinoNome string `json:"inquilino_nome"`
|
||||
UsuarioCodigo string `json:"usuario_codigo"`
|
||||
UsuarioNome string `json:"usuario_nome"`
|
||||
UsuarioTelefone string `json:"usuario_telefone"`
|
||||
UsuarioEmail string `json:"usuario_email"`
|
||||
}
|
||||
|
||||
type PedidoResponse struct {
|
||||
PodeAbrir bool `json:"pode_abrir"`
|
||||
Motivo string `json:"motivo,omitempty"`
|
||||
ID string `json:"id,omitempty"`
|
||||
}
|
||||
|
||||
type PatchInput struct {
|
||||
Nota *int `json:"nota,omitempty"`
|
||||
Justificativa *string `json:"justificativa,omitempty"`
|
||||
Finalizar bool `json:"finalizar,omitempty"`
|
||||
}
|
||||
|
||||
type Registro struct {
|
||||
// ProdutoNome é o nome original do produto como enviado pela integração/widget.
|
||||
// Ele existe apenas para exibição ao usuário.
|
||||
//
|
||||
// Importante: a normalização (remoção de acentos/símbolos) é usada apenas
|
||||
// para formar o nome da tabela no Postgres e o parâmetro {produto} da rota.
|
||||
ProdutoNome string
|
||||
ID string
|
||||
Status string
|
||||
Nota *int
|
||||
Justificativa *string
|
||||
PedidoCriadoEm time.Time
|
||||
RespondidoEm *time.Time
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue