forked from ebhomengo/niki
"fix(niki):fixed some small bugs"
This commit is contained in:
parent
ec08823901
commit
16b8093e8c
5
Makefile
5
Makefile
|
@ -24,4 +24,7 @@ run:
|
||||||
go run main.go --migrate
|
go run main.go --migrate
|
||||||
|
|
||||||
docker:
|
docker:
|
||||||
sudo docker compose up -d
|
sudo docker compose up -d
|
||||||
|
|
||||||
|
swagger:
|
||||||
|
swag init
|
10
docs/docs.go
10
docs/docs.go
|
@ -751,9 +751,6 @@ const docTemplate = `{
|
||||||
"adminkindboxreqparam.AssignSenderRequest": {
|
"adminkindboxreqparam.AssignSenderRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"kind_box_req_id": {
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
"sender_agent_id": {
|
"sender_agent_id": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
}
|
}
|
||||||
|
@ -770,9 +767,6 @@ const docTemplate = `{
|
||||||
"properties": {
|
"properties": {
|
||||||
"count_accepted": {
|
"count_accepted": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "integer"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -819,10 +813,6 @@ const docTemplate = `{
|
||||||
"description": {
|
"description": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "description"
|
"example": "description"
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "integer",
|
|
||||||
"example": 1
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -740,9 +740,6 @@
|
||||||
"adminkindboxreqparam.AssignSenderRequest": {
|
"adminkindboxreqparam.AssignSenderRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"kind_box_req_id": {
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
"sender_agent_id": {
|
"sender_agent_id": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
}
|
}
|
||||||
|
@ -759,9 +756,6 @@
|
||||||
"properties": {
|
"properties": {
|
||||||
"count_accepted": {
|
"count_accepted": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "integer"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -808,10 +802,6 @@
|
||||||
"description": {
|
"description": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "description"
|
"example": "description"
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "integer",
|
|
||||||
"example": 1
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -44,8 +44,6 @@ definitions:
|
||||||
type: object
|
type: object
|
||||||
adminkindboxreqparam.AssignSenderRequest:
|
adminkindboxreqparam.AssignSenderRequest:
|
||||||
properties:
|
properties:
|
||||||
kind_box_req_id:
|
|
||||||
type: integer
|
|
||||||
sender_agent_id:
|
sender_agent_id:
|
||||||
type: integer
|
type: integer
|
||||||
type: object
|
type: object
|
||||||
|
@ -57,8 +55,6 @@ definitions:
|
||||||
properties:
|
properties:
|
||||||
count_accepted:
|
count_accepted:
|
||||||
type: integer
|
type: integer
|
||||||
id:
|
|
||||||
type: integer
|
|
||||||
type: object
|
type: object
|
||||||
adminkindboxreqparam.KindBoxReqAcceptResponse:
|
adminkindboxreqparam.KindBoxReqAcceptResponse:
|
||||||
properties:
|
properties:
|
||||||
|
@ -89,9 +85,6 @@ definitions:
|
||||||
description:
|
description:
|
||||||
example: description
|
example: description
|
||||||
type: string
|
type: string
|
||||||
id:
|
|
||||||
example: 1
|
|
||||||
type: integer
|
|
||||||
type: object
|
type: object
|
||||||
adminkindboxreqparam.KindBoxReqRejectResponse:
|
adminkindboxreqparam.KindBoxReqRejectResponse:
|
||||||
properties:
|
properties:
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
type KindBoxReqAcceptRequest struct {
|
type KindBoxReqAcceptRequest struct {
|
||||||
ID uint `json:"id"`
|
ID uint `json:"-"`
|
||||||
CountAccepted uint `json:"count_accepted"`
|
CountAccepted uint `json:"count_accepted"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package adminkindboxreqparam
|
package adminkindboxreqparam
|
||||||
|
|
||||||
type AssignSenderRequest struct {
|
type AssignSenderRequest struct {
|
||||||
KindBoxReqID uint `json:"kind_box_req_id"`
|
KindBoxReqID uint `json:"-"`
|
||||||
SenderAgentID uint `json:"sender_agent_id"`
|
SenderAgentID uint `json:"sender_agent_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package adminkindboxreqparam
|
package adminkindboxreqparam
|
||||||
|
|
||||||
type DeliverKindBoxReqRequest struct {
|
type DeliverKindBoxReqRequest struct {
|
||||||
KindBoxReqID uint `json:"kind_box_req_id"`
|
KindBoxReqID uint `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type DeliverKindBoxReqResponse struct{}
|
type DeliverKindBoxReqResponse struct{}
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
type KindBoxReqRejectRequest struct {
|
type KindBoxReqRejectRequest struct {
|
||||||
ID uint `json:"id" example:"1"`
|
ID uint `json:"-"`
|
||||||
Description string `json:"description" example:"description"`
|
Description string `json:"description" example:"description"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ CREATE TABLE `admins` (
|
||||||
`last_name` VARCHAR(191),
|
`last_name` VARCHAR(191),
|
||||||
`password` VARCHAR(191) NOT NULL,
|
`password` VARCHAR(191) NOT NULL,
|
||||||
`phone_number` VARCHAR(191) NOT NULL UNIQUE,
|
`phone_number` VARCHAR(191) NOT NULL UNIQUE,
|
||||||
`role` ENUM('super-admin','admin','agent') NOT NULL, -- default?
|
`role` ENUM('super-admin','admin','agent') NOT NULL DEFAULT 'admin',
|
||||||
`description` TEXT,
|
`description` TEXT,
|
||||||
`email` VARCHAR(191) NOT NULL UNIQUE,
|
`email` VARCHAR(191) NOT NULL UNIQUE,
|
||||||
`gender` ENUM('male','female'),
|
`gender` ENUM('male','female'),
|
||||||
|
|
Loading…
Reference in New Issue