================================================================================

 BrightProductsController - Summary & Response Structures

 File: SonWinCommonAPI/Controllers/BrightProductsController.cs

================================================================================


--------------------------------------------------------------------------------

 WHAT THE CONTROLLER DOES

--------------------------------------------------------------------------------

Exposes a single read endpoint that returns the price products / tariffs tied to

one customer + one service (metering point / EAN number) within a date range.

The data is read from the SonWin (Sonlinc) contract tables;

The query selects the contract "lines" for the requested EAN number.

--------------------------------------------------------------------------------

 METHODS

--------------------------------------------------------------------------------

1) GetProducts

   Route:    GET bright/products

   Auth:     [Authorize] (controller-level)

   Params:  

   Body:     none

   Returns: 

   What it does:

   Validation that affects the result (ALL failures surface as HTTP 500:

     Customer validation (AccountValidator.ValidateAccountGetOutput):

     Input validation (ProductsValidator.ValidateGetProductsAsyncInput):       

Output validation (ProductsValidator.ValidateGetProductsAsyncOutput):

--------------------------------------------------------------------------------

 RESPONSE STRUCTURE (IEnumerable<BrightProduct>)

--------------------------------------------------------------------------------

Top level is a JSON array of BrightProduct. One element per distinct AftageNr

(EAN). Because the query filters on a single @EanNumber, in practice there is

one group, and each contract row becomes one entry in that group's Prices list.

[
  {
    "ValidFrom": null,             // Hardcoded null 
    "ValidTo": null,               // Hardcoded null 
    "ServiceId": "<serviceId>",    // Echo of request serviceId param (MeteringPointId)
    "Prices": [
      {
        "Value": 0,                // Hardcoded 0 
        "Type": "kWh",             // Hardcoded "kWh" 
        "Note": null,              // Hardcoded null 
        "Name": "kWhPrice",        // Hardcoded "kWhPrice" 
        "ValidFrom": "<datetime>", // Data: AFORBKONTR.FRADATO (DbProduct.ContractActiveFrom)
        "ValidTo": "<datetime>",   // Data: AFORBKONTR.TILDATO (DbProduct.ContractActiveTo); null = open-ended
        "ValidHours": [],          // Not mapped 
        "ValidMonth": [],          // Not mapped 
        "ValidPart": null,         // Not mapped 
        "ValidFraction": null,     // Not mapped 
        "SubtractMeasurement": null// Not mapped 
      }
    ]
  }
]