From b1c1c0260beb896d550be111a3fb2a44bf758858 Mon Sep 17 00:00:00 2001 From: fernanda-one Date: Sat, 10 Aug 2024 23:21:01 +0700 Subject: [PATCH] feat: filter order history --- internal/.DS_Store | Bin 0 -> 6148 bytes internal/common/.DS_Store | Bin 0 -> 6148 bytes internal/constants/.DS_Store | Bin 0 -> 6148 bytes internal/entity/order.go | 7 +++++++ internal/handlers/.DS_Store | Bin 0 -> 6148 bytes internal/handlers/http/.DS_Store | Bin 0 -> 6148 bytes internal/handlers/http/order/order.go | 3 +++ internal/handlers/request/order.go | 2 ++ internal/handlers/response/order.go | 3 +++ internal/repository/.DS_Store | Bin 0 -> 6148 bytes internal/repository/orders/order.go | 11 ++++++++--- internal/services/.DS_Store | Bin 0 -> 6148 bytes internal/utils/.DS_Store | Bin 0 -> 6148 bytes k8s/.DS_Store | Bin 0 -> 6148 bytes 14 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 internal/.DS_Store create mode 100644 internal/common/.DS_Store create mode 100644 internal/constants/.DS_Store create mode 100644 internal/handlers/.DS_Store create mode 100644 internal/handlers/http/.DS_Store create mode 100644 internal/repository/.DS_Store create mode 100644 internal/services/.DS_Store create mode 100644 internal/utils/.DS_Store create mode 100644 k8s/.DS_Store diff --git a/internal/.DS_Store b/internal/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..2841480e36bf1933d5fcfa54b730856acc86cc82 GIT binary patch literal 6148 zcmeHKOHRW;4E3}nO507BEawW`AgamWtTpP?RN>;_2NHW= zvhYe=9cm9qJplW(Kn6!kM}*FpIT&2=9lY{9cq5D&b(3mWzG?pRTme_W75JqB=-F)f zTG3}$z!h)>P73h%A!0BVhNGf<*T-(rZtANdAY7>|j(im$B27-ZLAQ<>V4DilYDX$Ep4+esPVBnhpJs%RAV&ym(=A(mME&+%I)mb>! zT0&!zW92v)(n1jnC0eL>i6ItFeR99baWJ%Sh!-E?Z$1?-lHbn!DZ4`|!{~#7U|`C? zg-zFb|KIYHnJx0CAu$UEf`Na=fE3%i?S`B3yYCrLVvZtg4)V3(z)|K#H2GX<6s!yqPh`fvi!4W+eOB^RxY= z*ckv}eQlnA6@UesV35Ithprb-R%I8BWn7y33_p)0+YRNIbv?u)6!0msti zfpNWTKyz$0PhUFBk!|0TGvEw31J1x47~q>NvRE2=?+iEt&cHVVaz8{i!IW_@)T@J? zmH@SOjx83#iPN65uT$SZ#pFF{vl{;2K< z$!>G%|yH7?8i@@ z!s`WK+spnQ*Z}Bh&iHhi+58^+@#XkD497*~dcb=-yyDE?Y2JT>4;=80 z3;l@mJk>{P#0dl5m^{pr>qjXg1*Cu!kOERb3Qz&gY)60FSY8T90V(jKfWIFK&ABE| zjpNlp7b^g{V>rO;*d@rt1LT@KHD-jc)=F-zmMey}cE(HA)#RyhYlr3XVR^FUhGKC# z?_Z)ERvXJp0V(iX0pGoejnDrF+RFa#HG&k70{>J2>voU3Egvpt>*6te))v|m?HjC( na=IABLX)R#*I*`IX2Nm=LUys<|pZeWK{g=VDjOXla~ zS;}MpxXn2{0BZmhRd8|32(hS$ifSg@{7o0KRb$Wg) z?9kD1LX$g6?D0W8VVK5Oc*6mKWl~l@b(Uyp4$SJN<|WNNvd9~}bJLDxPM6W*>X;Gu zuuZ;s$ubA#?DJwPng>P)I@{^S1&#e>{cAlUdoE+Z7%&EYodNc2kxF`ii7{Xd7z0xV zMg0V%=GD}E~SF9Dsg!E8cN+qULrz3_->9l)|s};wDDIHFS z52rgjolsodo%MYThpQ9XY77_yIRnddyO#d{`1AaqC)u4bU<~{#23)ay+HUwt+FNHY vC%x8FpQ$1eHzxc_;YDo4jFnb=PmMymmkVO8I3}cpVm|_r23w4QKV{$(xO7Yo literal 0 HcmV?d00001 diff --git a/internal/handlers/http/order/order.go b/internal/handlers/http/order/order.go index b2d9343..7b68550 100644 --- a/internal/handlers/http/order/order.go +++ b/internal/handlers/http/order/order.go @@ -173,6 +173,9 @@ func (h *Handler) toHistoryOrderResponse(resp *entity.HistoryOrder) response.His PaymentType: resp.PaymentType, Status: resp.Status, Amount: resp.Amount, + VisitDate: resp.VisitDate.Format(time.RFC3339), + TicketStatus: resp.TicketStatus, + Source: resp.Source, } } diff --git a/internal/handlers/request/order.go b/internal/handlers/request/order.go index b49ba0f..65769c2 100644 --- a/internal/handlers/request/order.go +++ b/internal/handlers/request/order.go @@ -44,6 +44,7 @@ type OrderParam struct { Limit int `form:"limit" json:"limit" example:"10"` Offset int `form:"offset" json:"offset" example:"0"` Period string `form:"period" json:"period" example:"1d,7d,1m"` + Source string `form:"source" json:"source" example:"tes"` } func (o *OrderParam) ToOrderEntity(ctx mycontext.Context) entity.OrderSearch { @@ -58,6 +59,7 @@ func (o *OrderParam) ToOrderEntity(ctx mycontext.Context) entity.OrderSearch { EndDate: o.EndDate, Status: o.Status, Period: o.Period, + Source: o.Source, } } diff --git a/internal/handlers/response/order.go b/internal/handlers/response/order.go index 5bda2ef..c4c6019 100644 --- a/internal/handlers/response/order.go +++ b/internal/handlers/response/order.go @@ -35,6 +35,9 @@ type HistoryOrder struct { PaymentType string `json:"payment_type"` Status string `json:"status"` Amount float64 `json:"amount"` + VisitDate string `json:"visit_date"` + TicketStatus string `json:"ticket_status"` + Source string `json:"source"` } type OrderItem struct { diff --git a/internal/repository/.DS_Store b/internal/repository/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..347dec1015b20fdcb3526db5df3e840eabee0784 GIT binary patch literal 6148 zcmeHKOKyWO5Pi;@l1b1=u#+4`lOK0gbsTw`;#L`uXE(zZXSCSI&o99a zH4Pugu}6s}HqO1V#3!m)y`XQ63r>gK zJ6xt{voT-{^ck4yd{UEzC28@BbV!+KdubVY*DeSGIo0GjZ<#^)|5x-9H k8p4I&is>s`@e_v^>Qh+|vw)odX8+J{hymlP#Hj zpm#%KJ6)xuvX}h1|E<0U-AZK8q)3x0HFZ^U?i~KyqXU>2#@Xr_s#rAc(;X~Qo`seZFu8nMOY$D<} p%7DUg_7lK~oFh-ksP-sh`c;ObqGS<$3McxHKqACDXW$A9d;_piMZo|7 literal 0 HcmV?d00001 diff --git a/internal/utils/.DS_Store b/internal/utils/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..8f31184593ab442d4c28b6a64c95361fa26d0f1b GIT binary patch literal 6148 zcmeHKyG{c^3>-s>AexjZ_ZRqsRTRE}AAk@<6LC_2{;GTzpT_v1i0G0Ai3W`&dv<-E zTkRC*GXPtCZts8vfH~a}2M<&8=k61`s*Dloe8(P7_`rbu_I*-)KH=OOyy69K^dJ1^ z-DVhe=Sj*+0VyB_q<|EV0>4(kdoOK%o2V!Sq<|DSD&XITMtAImV`6+d7-9q<&X^A4 zI%WxC^8~RMj)~0BEUCn#T8$W%bmm*t^};bR>986;tWLI?P%KX8`&*R5dZMBfkOHR) zT<3P-{r{eRVg5fQX(t7wz`s(!X6uLbidU-MI=P(p+D3n*d(9W!jq9K=L^~!%JLbmQ e@iL0CuKAkJd*PTEbmoIj)X#wHB9j7tt-v?3?-j2A literal 0 HcmV?d00001 diff --git a/k8s/.DS_Store b/k8s/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..b86c50bc80b507fbf8d50526cd2c3a0c0169e28b GIT binary patch literal 6148 zcmeHKOKL(v5Ufsw2-&!FIalxogP0TK0*MMDNL-lg-^z34XsP}XB2QN#n@|niHPf%_ z4O5HPuL0QdW4i!m0H$;i+uh{+M z9}m|F%1Qw#AO)m=6p#YHQowsJZTgs~C*b9fm_;fJD2tb@L9maLc z62#^SVlNyLnW0%yiAl8@F)ZoKx2o%fLt@flHGEi|Y&D@+oX+>RD2Me#MJXT!E)}@X z?acfC6aB{ge@W6#3P^!}rGQOV&#NV`RK0a{Iq$WN{zCVfPr4h|L1Bn?OpJESjkn`@ c6lGoWHJ|swAu;I82c4*&0oO$)1^!xrFLosri2wiq literal 0 HcmV?d00001