fix (area): fix pagination area data source

This commit is contained in:
dpurbosakti
2025-10-08 11:41:53 +07:00
parent 2b0c5ac577
commit e9b262175d
15 changed files with 106 additions and 21 deletions

No files matched your search

@@ -12,10 +12,17 @@ type CreateDto struct {
}
type ReadListDto struct {
FilterDto
Includes string `json:"includes"`
Preloads []string `json:"-"`
Search string `json:"search"`
Pagination ecore.Pagination
}
type FilterDto struct {
Regency_Code string `json:"regency-code"`
Code string `json:"code"`
Name string `json:"name"`
Pagination ecore.Pagination
}
type ReadDetailDto struct {
+15 -10
View File
@@ -2,6 +2,7 @@ package province
import (
ecore "simrs-vx/internal/domain/base-entities/core"
er "simrs-vx/internal/domain/main-entities/regency"
)
type CreateDto struct {
@@ -10,11 +11,18 @@ type CreateDto struct {
}
type ReadListDto struct {
Code string `json:"code"`
Name string `json:"name"`
FilterDto
Includes string `json:"includes"`
Preloads []string `json:"-"`
Search string `json:"search"`
Pagination ecore.Pagination
}
type FilterDto struct {
Code string `json:"code"`
Name string `json:"name"`
}
type ReadDetailDto struct {
Id int16 `json:"id"`
Code *string `json:"code"`
@@ -36,17 +44,14 @@ type MetaDto struct {
}
type ResponseDto struct {
Id int16 `json:"id"`
Code string `json:"code"`
Name string `json:"name"`
Id int16 `json:"id"`
Code string `json:"code"`
Name string `json:"name"`
Regencies []*er.Regency `json:"regencies,omitempty"`
}
func (d Province) ToResponse() ResponseDto {
resp := ResponseDto{
Id: d.Id,
Code: d.Code,
Name: d.Name,
}
resp := ResponseDto(d)
return resp
}
+8 -1
View File
@@ -12,10 +12,17 @@ type CreateDto struct {
}
type ReadListDto struct {
FilterDto
Includes string `json:"includes"`
Preloads []string `json:"-"`
Search string `json:"search"`
Pagination ecore.Pagination
}
type FilterDto struct {
Province_Code string `json:"province-code"`
Code string `json:"code"`
Name string `json:"name"`
Pagination ecore.Pagination
}
type ReadDetailDto struct {
+9 -3
View File
@@ -10,12 +10,18 @@ type CreateDto struct {
}
type ReadListDto struct {
Code string `json:"code"`
Name string `json:"name"`
Search string `json:"search"`
FilterDto
Includes string `json:"includes"`
Preloads []string `json:"-"`
Search string `json:"search"`
Pagination ecore.Pagination
}
type FilterDto struct {
Code string `json:"code"`
Name string `json:"name"`
}
type ReadDetailDto struct {
Id uint16 `json:"id"`
Code *string `json:"code"`
+8 -1
View File
@@ -11,10 +11,17 @@ type CreateDto struct {
}
type ReadListDto struct {
FilterDto
Includes string `json:"includes"`
Preloads []string `json:"-"`
Search string `json:"search"`
Pagination ecore.Pagination
}
type FilterDto struct {
District_Code string `json:"district-code"`
Code string `json:"code"`
Name string `json:"name"`
Pagination ecore.Pagination
}
type ReadDetailDto struct {