refactor-location #134
			
				
			
		
		
		
	| 
						 | 
					@ -26,7 +26,6 @@ func (s SupplierRole) GetListRole(p model.GetListRoleRequest) (*model.GetListRol
 | 
				
			||||||
		Data  *model.GetListRoleResponse `json:"data"`
 | 
							Data  *model.GetListRoleResponse `json:"data"`
 | 
				
			||||||
		Error string                     `json:"error"`
 | 
							Error string                     `json:"error"`
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					 | 
				
			||||||
	if err = json.Unmarshal(msg.Data, &r); err != nil {
 | 
						if err = json.Unmarshal(msg.Data, &r); err != nil {
 | 
				
			||||||
		return nil, err
 | 
							return nil, err
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -17,3 +17,10 @@ type PermissionBrief struct {
 | 
				
			||||||
type CreatePermissionResponse struct {
 | 
					type CreatePermissionResponse struct {
 | 
				
			||||||
	ID string `json:"_id"`
 | 
						ID string `json:"_id"`
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type PermissionShort struct {
 | 
				
			||||||
 | 
						ID    string `json:"_id"`
 | 
				
			||||||
 | 
						Name  string `json:"name"`
 | 
				
			||||||
 | 
						Code  string `json:"code"`
 | 
				
			||||||
 | 
						Group string `json:"group"`
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -15,6 +15,7 @@ type CreateRoleRequest struct {
 | 
				
			||||||
	Name        string   `json:"name"`
 | 
						Name        string   `json:"name"`
 | 
				
			||||||
	Code        string   `json:"code"`
 | 
						Code        string   `json:"code"`
 | 
				
			||||||
	Type        string   `json:"type"`
 | 
						Type        string   `json:"type"`
 | 
				
			||||||
 | 
						SupplierID  string   `json:"supplierId"`
 | 
				
			||||||
	Permissions []string `json:"permissions"`
 | 
						Permissions []string `json:"permissions"`
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -23,5 +24,6 @@ type UpdateRoleRequest struct {
 | 
				
			||||||
	Name        string   `json:"name"`
 | 
						Name        string   `json:"name"`
 | 
				
			||||||
	Code        string   `json:"code"`
 | 
						Code        string   `json:"code"`
 | 
				
			||||||
	Type        string   `json:"type"`
 | 
						Type        string   `json:"type"`
 | 
				
			||||||
 | 
						SupplierID  string   `json:"supplierId"`
 | 
				
			||||||
	Permissions []string `json:"permissions"`
 | 
						Permissions []string `json:"permissions"`
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,12 +6,14 @@ type GetListRoleResponse struct {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type RoleBrief struct {
 | 
					type RoleBrief struct {
 | 
				
			||||||
	ID        string `json:"_id"`
 | 
						ID          string            `json:"_id"`
 | 
				
			||||||
	Name      string `json:"name"`
 | 
						Name        string            `json:"name"`
 | 
				
			||||||
	Code      string `json:"code"`
 | 
						Code        string            `json:"code"`
 | 
				
			||||||
	Type      string `json:"type"`
 | 
						Type        string            `json:"type"`
 | 
				
			||||||
	CreatedAt string `json:"createdAt"`
 | 
						Permissions []PermissionShort `json:"permissions"`
 | 
				
			||||||
	UpdatedAt string `json:"updatedAt"`
 | 
						SupplierId  string            `json:"supplierId"`
 | 
				
			||||||
 | 
						CreatedAt   string            `json:"createdAt"`
 | 
				
			||||||
 | 
						UpdatedAt   string            `json:"updatedAt"`
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type CreateRoleResponse struct {
 | 
					type CreateRoleResponse struct {
 | 
				
			||||||
| 
						 | 
					@ -19,8 +21,9 @@ type CreateRoleResponse struct {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type RoleShort struct {
 | 
					type RoleShort struct {
 | 
				
			||||||
	ID   string `json:"_id"`
 | 
						ID         string `json:"_id"`
 | 
				
			||||||
	Name string `json:"name"`
 | 
						Name       string `json:"name"`
 | 
				
			||||||
	Code string `json:"code"`
 | 
						Code       string `json:"code"`
 | 
				
			||||||
	Type string `json:"type"`
 | 
						Type       string `json:"type"`
 | 
				
			||||||
 | 
						SupplierId string `json:"supplierId"`
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,6 +4,7 @@ type GetListOwnerRequest struct {
 | 
				
			||||||
	Page       int    `json:"page"`
 | 
						Page       int    `json:"page"`
 | 
				
			||||||
	Limit      int    `json:"limit"`
 | 
						Limit      int    `json:"limit"`
 | 
				
			||||||
	Status     string `json:"status"`
 | 
						Status     string `json:"status"`
 | 
				
			||||||
 | 
						Type       string `json:"type"`
 | 
				
			||||||
	SupplierID string `json:"supplierId"`
 | 
						SupplierID string `json:"supplierId"`
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue