MultiView Microservice
The MultiView microservice enables the grouping and management of multiple reports under a conceptual “view,” enriched with contextual metadata like risk grades and scoring dimensions. It is ideal for users who need to organize and assess multiple risk reports through a unified lens.
Model (models.go)
MultiView
Represents a user's collection of related reports with risk and scoring dimensions.
| Field | Type | Description |
|---|---|---|
ID | ObjectID (MongoDB) | Unique ID of the MultiView (BSON _id) |
Name | string | Name/title of the MultiView |
MultiViewSets | []MultiViewSets | List of associated report metadata |
CreatedAt | time.Time | Creation timestamp |
UpdatedAt | time.Time | Last updated timestamp |
CreatedBy | uint32 | ID of the creator |
UpdatedBy | uint32 | ID of the last updater |
MultiViewSets
Represents metadata for a report within a MultiView.
| Field | Type | Description |
|---|---|---|
ReportID | string | Unique identifier for the report |
ReportName | string | Name/title of the report |
RiskGrade | string | Risk grade associated with the report |
Dimension | []ScorecardDimensionEnum | List of scored dimensions for this report |
Enums
ScorecardDimensionEnum
These enumerated dimensions capture key areas used in scoring:
enum ScorecardDimensionEnum {
CORPORATE_STRUCTURE_AND_OPERATIONAL_CAPABILITY = 0;
FINANCIAL_HEALTH = 1;
CREDIT_HISTORY = 2;
COMPLIANCE_RIGOR = 3;
LITIGATION_HISTORY = 4;
DEFAULTER_AND_BLACKLIST_MENTIONS = 5;
SANCTIONS_AND_PEP_MENTIONS = 6;
PROMOTER_AND_RELATED_PARTY_QUALITY = 7;
MARKET_SENTIMENT = 8;
}
gRPC API (multiview.proto)
Messages
Requests
- CreateMultiViewRequest – Creates a new MultiView entry.
- UpdateMultiViewRequest – Updates an existing MultiView by its ID.
- GetMultiViewsByCreatedByRequest – Returns all MultiViews created by a specific user.
Response
- MultiViewResponse
message: Status or description.code: Response code (e.g., "200", "ERR_NOT_FOUND").data: List ofMultiViewobjects.total: Total number of matching records.
Services
service MultiViewService {
rpc CreateMultiView(CreateMultiViewRequest) returns (MultiViewResponse);
rpc GetMultiViewsByCreatedBy(GetMultiViewsByCreatedByRequest) returns (MultiViewResponse);
rpc UpdateMultiView(UpdateMultiViewRequest) returns (MultiViewResponse);
}
Related Models
These models are typically referenced via IDs in MultiViewSets:
Report
Describes a detailed risk report and metadata.
| Field | Type | Description |
|---|---|---|
ID | uuid.UUID | Report's UUID |
Title | string | Report title |
LegacyReportType | string | Classification of the report |
OrganizationID | *int | Linked organization ID (nullable) |
Status | string | Status of the report (e.g., "Draft") |
YearsToCrawl | *int | Historical depth of data |
RiskScore
Provides scores and grades for specific metrics within reports.
| Field | Type | Description |
|---|---|---|
MetricName | string | Name of the evaluated metric |
Score | float64 | Risk score (numeric) |
Grade | string | Risk grade (e.g., "A", "B-", etc.) |
ReportID | *uuid.UUID | Associated report ID |