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