product
Product catalogue (crops and inputs) with class, major type and minor type.
Table factsheetagri_db
- Written by
- Legacy setup (
ProductDTO) HomeActivity/SetupServiceHelperrefresh
- Legacy setup (
- Read by
HomeActivity(getAllProductData)- Inventory category list (
getAllProductCategoryByLanguage) Repo.createProductMaster/createProductSKU
- Filled from
POST api/setupdata/v2 (ProductDTO)- Sync
- Has appId/opId/syncStatus from BaseEntity, but rows are download-only: syncStatus stays SYNC_DONE and opId is unused.
- Source
- data/src/main/java/org/mindtree/app/agricultor/data/entity/Product.kt
Columns
| Column | Type | Null | Key | Meaning |
|---|---|---|---|---|
productCode | TEXT | Yes | Product code (= PPLI genericProduct). | |
name | TEXT | Yes | Default (server) product name. Used as fallback when product_nameml has no name for a language. | |
isActive | INTEGER | Yes | Soft-delete flag (1 = active). | |
id | INTEGER | Yes | Index | Server id. Null or 0 until the row is synced. Index: unique. |
appId | TEXT | No | PK | Client-side UUID. Defaults to a random UUID when the object is built, including when server JSON is parsed. |
opId | TEXT | Yes | Id of the last queued operation in the library queue (SYNC_QUEUE_DB). | |
syncStatus | TEXT | No | SYNC_NOT_INITIALIZED | IN_SYNC_QUEUE | SYNC_DONE (default). | |
productclass_label | TEXT | Yes | Display label. | |
productclass_dataCode | TEXT | Yes | Reference data code. | |
productclass_globalrefclass_classCode | TEXT | Yes | Reference class of the code (flattened embedded DTO). | |
productclass_globalrefclass_name | TEXT | Yes | Reference class of the code (flattened embedded DTO). | |
productclass_language_language | TEXT | Yes | Language name. | |
productclass_language_languageCode | TEXT | Yes | Language code (ENG, TEL, ...). | |
productmajortype_label | TEXT | Yes | Display label. | |
productmajortype_dataCode | TEXT | Yes | Major type (crop group). | |
productmajortype_globalrefclass_classCode | TEXT | Yes | Reference class of the code (flattened embedded DTO). | |
productmajortype_globalrefclass_name | TEXT | Yes | Reference class of the code (flattened embedded DTO). | |
productmajortype_language_language | TEXT | Yes | Language name. | |
productmajortype_language_languageCode | TEXT | Yes | Language code (ENG, TEL, ...). | |
productminortype_label | TEXT | Yes | Display label. | |
productminortype_dataCode | TEXT | Yes | Reference data code. | |
productminortype_language_language | TEXT | Yes | Language name. | |
productminortype_language_languageCode | TEXT | Yes | Language code (ENG, TEL, ...). | |
productminortype_tenantrefclass_classCode | TEXT | Yes | Reference class of the code (flattened embedded DTO). | |
productminortype_tenantrefclass_name | TEXT | Yes | Reference class of the code (flattened embedded DTO). |
Notes
- Source for the derived product_master and product_sku_master tables.