Skip to content

eccmodel

Version: v1 Scope: per-tenant+store Owning service: ecc-image-render-service

An eccmodel record defines the hardware model of an ECC-driven ESL device: its display characteristics, compatible ESL type IDs, physical orientation, and the full model definition used during rendering. The model definition (stored as a JSON file in LFS) contains views, layout rules, field mappings, and conversion scripts that ecc-image-render-service evaluates to produce a rendered image.

Models are loaded from esl-config — the configuration layer that describes which ECC device models are available in a given store. The id is derived from the model name by replacing spaces and special characters with hyphens.

The compatible_esltype_ids list is the bridge between the ECC model world and the broader Pricer device inventory: it lists all the ESL type IDs (esltypes/{id}) that the model can physically render onto. ecc-image-render-service uses this to select the correct model when it receives a render request for a particular ESL.

ID pattern

t/{tenantid}/s/{storeid}/eccmodels/{modelid}

  • t/{tenantid} — tenant namespace
  • s/{storeid} — store within the tenant
  • eccmodels/{modelid} — where modelid is the model name normalised to lowercase with spaces and special characters replaced by hyphens

Examples:

t/10001/s/S001/eccmodels/smarttag-color-4-2
t/10001/s/S001/eccmodels/smarttag-regular

Schema

Field Type Description
id string Primary ID. Derived from the human-readable model name by lowercasing and replacing spaces/special characters with hyphens
display_name string Human-readable model name as it appears in esl-config. Examples: SmartTAG Color 4.2, SmartTAG Regular
compatible_esltype_ids repeated string List of ESL type IDs this model supports. Format: esltypes/{esltype-id}. Must be stored in lexicographic order. Examples: esltypes/1318, esltypes/1510
rotation Rotation The orientation of this model's display. Determines how the rendered image must be rotated to appear upright on the physical hardware
json_file_path string LFS path to the full model definition JSON file. The filename is the SHA-256 hash of the file content. Format: ecc/t/{tenantid}/models/{sha256}.json. The JSON contains views, layouts, fields, conversion scripts, and all rendering details

Rotation enum

Value Description
NONE (0) The model's display is oriented upright by default; no rotation needed
CW_90 (1) The model's display is mounted rotated 90 degrees clockwise relative to the image coordinate system

Note: eccmodel's Rotation enum has only two values (NONE and CW_90), unlike the four-value enum in the image DTOs. This reflects the physical mounting constraints of ECC device hardware.

Consumed by

Service Why
ecc-image-render-service Loads the model definition from json_file_path in LFS and uses compatible_esltype_ids and rotation to render the correct image for an ECC-driven ESL page
  • eccparameters — singleton per-store global rendering parameters (key-value map and IPF entries); always read alongside the model during rendering
  • ecceslimage — the rendered output that ecc-image-render-service produces using this model
  • eccimage — static image assets (logos, photos) referenced by the model's layout definitions
  • storeesl — provides esltype_id for an ESL; matched against compatible_esltype_ids to select the correct model