package cardpinorders import ( "time" "online-back/internal/shared" ) type CardPinOrderDTO struct { Id int64 `json:"id"` UniqueId *string `json:"uniqueId"` UserId *int64 `json:"-"` User *shared.UserInfo `json:"user,omitempty"` CardTypeId int64 `json:"-"` CardType *shared.NamedInfo `json:"cardType,omitempty"` CardNumber *string `json:"cardNumber"` Region string `json:"region"` BranchId int64 `json:"-"` Branch *shared.NamedInfo `json:"branch,omitempty"` CustomerName string `json:"customerName"` CustomerSurname string `json:"customerSurname"` CustomerPatronicName *string `json:"customerPatronicName"` BornAt *time.Time `json:"bornAt"` Phone *string `json:"phone"` PassportSerie string `json:"passportSerie"` PassportId string `json:"passportId"` PassportOne string `json:"passportOne"` PassportTwo string `json:"passportTwo"` PassportThree string `json:"passportThree"` PassportFour string `json:"passportFour"` Status *string `json:"status"` Notes *string `json:"notes"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` } type CreateCardPinOrderDTO struct { UniqueId *string `json:"uniqueId"` UserId *shared.FlexibleInt64 `json:"userId" swaggertype:"integer"` CardTypeId shared.FlexibleInt64 `json:"cardTypeId" binding:"required" swaggertype:"integer"` CardNumber *string `json:"cardNumber"` Region string `json:"region" binding:"required"` BranchId shared.FlexibleInt64 `json:"branchId" binding:"required" swaggertype:"integer"` CustomerName string `json:"customerName" binding:"required"` CustomerSurname string `json:"customerSurname" binding:"required"` CustomerPatronicName *string `json:"customerPatronicName"` BornAt *shared.FlexibleTime `json:"bornAt" swaggertype:"string" format:"date"` Phone *string `json:"phone"` PassportSerie string `json:"passportSerie" binding:"required"` PassportId string `json:"passportId" binding:"required"` PassportOne string `json:"passportOne" binding:"required"` PassportTwo string `json:"passportTwo" binding:"required"` PassportThree string `json:"passportThree" binding:"required"` PassportFour string `json:"passportFour" binding:"required"` Status *string `json:"status"` Notes *string `json:"notes"` } type UpdateCardPinOrderDTO struct { UniqueId *string `json:"uniqueId"` UserId *shared.FlexibleInt64 `json:"userId" swaggertype:"integer"` CardTypeId shared.FlexibleInt64 `json:"cardTypeId" binding:"required" swaggertype:"integer"` CardNumber *string `json:"cardNumber"` Region string `json:"region" binding:"required"` BranchId shared.FlexibleInt64 `json:"branchId" binding:"required" swaggertype:"integer"` CustomerName string `json:"customerName" binding:"required"` CustomerSurname string `json:"customerSurname" binding:"required"` CustomerPatronicName *string `json:"customerPatronicName"` BornAt *shared.FlexibleTime `json:"bornAt" swaggertype:"string" format:"date"` Phone *string `json:"phone"` PassportSerie string `json:"passportSerie" binding:"required"` PassportId string `json:"passportId" binding:"required"` PassportOne string `json:"passportOne" binding:"required"` PassportTwo string `json:"passportTwo" binding:"required"` PassportThree string `json:"passportThree" binding:"required"` PassportFour string `json:"passportFour" binding:"required"` Status *string `json:"status"` Notes *string `json:"notes"` } type ListFilter struct { Status *string BranchId *int64 BranchIds []int64 UserId *int64 CardTypeId *int64 Region string Page int Limit int } // CardPinOrderListItemDTO is the list row; card type, branch, passport and // scans come from GET /card-pin-orders/:id. type CardPinOrderListItemDTO struct { Id int64 `json:"id"` UniqueId *string `json:"uniqueId"` CardNumber *string `json:"cardNumber"` CustomerName string `json:"customerName"` CustomerSurname string `json:"customerSurname"` Region string `json:"region"` // ProvinceName is the branch's province (etrap). ProvinceName shared.LocalizedText `json:"provinceName"` Phone *string `json:"phone"` Status *string `json:"status"` CreatedAt time.Time `json:"createdAt"` } type ListCardPinOrderDTO struct { Count int64 `json:"count"` CardPinOrders []CardPinOrderListItemDTO `json:"cardPinOrders"` }