feat: add TuxNumber field

This commit is contained in:
Maxim Dolgushin 2023-10-25 14:58:55 +07:00
parent 30f2a790e2
commit c900abb9b3
4 changed files with 10 additions and 5 deletions

@ -94,6 +94,9 @@ paths:
type: string type: string
accepted: accepted:
type: boolean type: boolean
taxnumber:
type: string
description: ИНН пользователя
responses: responses:
"200": "200":
description: успешное подтверждение или отклонение верификации description: успешное подтверждение или отклонение верификации

@ -26,7 +26,7 @@ func (r *VerificationController) GetRoutes() []Route {
{"GET", "/verification/:userID", "GetVerification", r.GetVerification}, {"GET", "/verification/:userID", "GetVerification", r.GetVerification},
{"POST", "/verification", "CreateVerification", r.CreateVerification}, {"POST", "/verification", "CreateVerification", r.CreateVerification},
{"PATCH", "/verification", "SetVerificationStatus", r.SetVerificationStatus}, {"PATCH", "/verification", "SetVerificationStatus", r.SetVerificationStatus},
{Method: "PATCH", Path: "/verification/file", Name: "SetVerificationFile", Handler: r.SetVerificationFile}, {"PATCH", "/verification/file", "SetVerificationFile", r.SetVerificationFile},
} }
} }

@ -5,8 +5,9 @@ type ReqCreateVerification struct {
} }
type ReqSetVerification struct { type ReqSetVerification struct {
ID string `json:"id"` ID string `json:"id"`
Status string `json:"status"` Status string `json:"status"`
Comment string `json:"comment"` Comment string `json:"comment"`
Accepted bool `json:"accepted"` Accepted bool `json:"accepted"`
TaxNumber string `json:"taxnumber"`
} }

@ -10,6 +10,7 @@ type Verification struct {
UpdatedAt time.Time `json:"updated_at" bson:"updated_at"` UpdatedAt time.Time `json:"updated_at" bson:"updated_at"`
Comment string `json:"comment" bson:"comment,omitempty"` Comment string `json:"comment" bson:"comment,omitempty"`
Files []VerificationFile `json:"files" bson:"files,omitempty"` Files []VerificationFile `json:"files" bson:"files,omitempty"`
TaxNumber string `json:"taxnumber" bson:"taxnumber,omitempty"`
} }
type VerificationFile struct { type VerificationFile struct {