build auth sms

This commit is contained in:
Tue 2022-11-02 14:56:58 +07:00
parent 7d00af18b4
commit cdbbf9fc73
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

@ -10,6 +10,8 @@ type RoleBrief struct {
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"`
}
@ -23,4 +25,5 @@ type RoleShort struct {
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"`
}