Database / Reference data

cropdata

Crop list configuration: display order, crop type and label overrides per product code.

Table factsheetagri_db
Written by
  • Repo.insertCropData (DataSetupViewModel, UnitDataSetupViewModel, DataUtil.getCropData)
Read by
  • Repo.getCropData / createProductSKU
Filled from
GET ie-registration/assets/json/inventory/crops-list.json
Source
data/src/main/java/org/mindtree/app/agricultor/data/entity/CropData.kt

Columns

ColumnTypeNullKeyMeaning
idINTEGERNoPKServer id. Null or 0 until the row is synced. Autoincrement.
productCodeTEXTYesproduct.productCode this config applies to.
sequenceNoINTEGERYesDisplay order.
cropTypeTEXTYesCrop group used to filter the crop picker, e.g. Agriculture | Horticulture | Polycropping | PMDS | RDS | A Grade.
labelListTEXTYesJSON list of per-language labels.

Notes

  • Possible bug · unverified inserted with IGNORE on conflict, so updated crop config may not replace old rows.