build auth sms

This commit is contained in:
Tue 2022-11-02 14:56:58 +07:00
parent 285ddb75e7
commit 19349b9813
5 changed files with 23 additions and 11 deletions

View File

@ -26,7 +26,6 @@ func (s SupplierRole) GetListRole(p model.GetListRoleRequest) (*model.GetListRol
Data *model.GetListRoleResponse `json:"data"`
Error string `json:"error"`
}
if err = json.Unmarshal(msg.Data, &r); err != nil {
return nil, err
}

View File

@ -17,3 +17,10 @@ type PermissionBrief struct {
type CreatePermissionResponse struct {
ID string `json:"_id"`
}
type PermissionShort struct {
ID string `json:"_id"`
Name string `json:"name"`
Code string `json:"code"`
Group string `json:"group"`
}

View File

@ -15,6 +15,7 @@ type CreateRoleRequest struct {
Name string `json:"name"`
Code string `json:"code"`
Type string `json:"type"`
SupplierID string `json:"supplierId"`
Permissions []string `json:"permissions"`
}
@ -23,5 +24,6 @@ type UpdateRoleRequest struct {
Name string `json:"name"`
Code string `json:"code"`
Type string `json:"type"`
SupplierID string `json:"supplierId"`
Permissions []string `json:"permissions"`
}

View File

@ -6,12 +6,14 @@ type GetListRoleResponse struct {
}
type RoleBrief struct {
ID string `json:"_id"`
Name string `json:"name"`
Code string `json:"code"`
Type string `json:"type"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
ID string `json:"_id"`
Name string `json:"name"`
Code string `json:"code"`
Type string `json:"type"`
Permissions []PermissionShort `json:"permissions"`
SupplierId string `json:"supplierId"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
type CreateRoleResponse struct {
@ -19,8 +21,9 @@ type CreateRoleResponse struct {
}
type RoleShort struct {
ID string `json:"_id"`
Name string `json:"name"`
Code string `json:"code"`
Type string `json:"type"`
ID string `json:"_id"`
Name string `json:"name"`
Code string `json:"code"`
Type string `json:"type"`
SupplierId string `json:"supplierId"`
}

View File

@ -4,6 +4,7 @@ type GetListOwnerRequest struct {
Page int `json:"page"`
Limit int `json:"limit"`
Status string `json:"status"`
Type string `json:"type"`
SupplierID string `json:"supplierId"`
}