feat/sso-auth: improved the entities
This commit is contained in:
@@ -15,6 +15,7 @@ type ReadListDto struct {
|
|||||||
FilterDto
|
FilterDto
|
||||||
Includes string `json:"includes"`
|
Includes string `json:"includes"`
|
||||||
Pagination ecore.Pagination
|
Pagination ecore.Pagination
|
||||||
|
Sort string `json:"sort"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type FilterDto struct {
|
type FilterDto struct {
|
||||||
@@ -23,7 +24,9 @@ type FilterDto struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type ReadDetailDto struct {
|
type ReadDetailDto struct {
|
||||||
Id uint16 `json:"id"`
|
Id *uint16 `json:"id"`
|
||||||
|
Code *string `json:"code"`
|
||||||
|
Includes string `json:"includes"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type UpdateDto struct {
|
type UpdateDto struct {
|
||||||
|
|||||||
@@ -16,16 +16,19 @@ type ReadListDto struct {
|
|||||||
FilterDto
|
FilterDto
|
||||||
Includes string `json:"includes"`
|
Includes string `json:"includes"`
|
||||||
Pagination ecore.Pagination
|
Pagination ecore.Pagination
|
||||||
|
Sort string `json:"sort"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type FilterDto struct {
|
type FilterDto struct {
|
||||||
Name *string `json:"name"`
|
Name *string `json:"name"`
|
||||||
AuthPartner_Code *string `json:"authPartner_code"`
|
AuthPartner_Code *string `json:"authPartner_code"`
|
||||||
User_Name *string `json:"user_name"`
|
User_Name *string `json:"user_name"`
|
||||||
|
Includes string `json:"includes"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ReadDetailDto struct {
|
type ReadDetailDto struct {
|
||||||
Id uint `json:"id"`
|
Id uint `json:"id"`
|
||||||
|
Includes string `json:"includes"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type UpdateDto struct {
|
type UpdateDto struct {
|
||||||
@@ -45,18 +48,18 @@ type MetaDto struct {
|
|||||||
|
|
||||||
type ResponseDto struct {
|
type ResponseDto struct {
|
||||||
ecore.Main
|
ecore.Main
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
AuthPartner_Code string `json:"authPartner_code"`
|
AuthPartner_Code string `json:"authPartner_code"`
|
||||||
AuthPartner *eap.AuthPartner `json:"authPartner,omitempty"`
|
AuthPartner *eap.AuthPartner `json:"authPartner,omitempty"`
|
||||||
User_Name string `json:"user_name"`
|
User_Name string `json:"user_name"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d ExtUser) ToResponse() ResponseDto {
|
func (d ExtUser) ToResponse() ResponseDto {
|
||||||
resp := ResponseDto{
|
resp := ResponseDto{
|
||||||
Name: d.Name,
|
Name: d.Name,
|
||||||
AuthPartner_Code: d.AuthPartner_Code,
|
AuthPartner_Code: d.AuthPartner_Code,
|
||||||
AuthPartner: d.AuthPartner,
|
AuthPartner: d.AuthPartner,
|
||||||
User_Name: d.User_Name,
|
User_Name: d.User_Name,
|
||||||
}
|
}
|
||||||
resp.Main = d.Main
|
resp.Main = d.Main
|
||||||
return resp
|
return resp
|
||||||
|
|||||||
Reference in New Issue
Block a user