"fix(niki):fixed some small bugs"

This commit is contained in:
AMiR 2024-05-20 21:07:44 +03:30 committed by Iman Mirazimi
parent ec08823901
commit 16b8093e8c
9 changed files with 9 additions and 33 deletions

View File

@ -25,3 +25,6 @@ run:
docker: docker:
sudo docker compose up -d sudo docker compose up -d
swagger:
swag init

View File

@ -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
} }
} }
}, },

View File

@ -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
} }
} }
}, },

View File

@ -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:

View File

@ -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"`
} }

View File

@ -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"`
} }

View File

@ -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{}

View File

@ -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"`
} }

View File

@ -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'),