ie
Canonical farmer in the platform API (IE DTO) shape. This is what gets POSTed and PATCHed to the server.
Table factsheetagri_db
- Written by
- Legacy setup (IEDTO,
Repo.saveIEList) - Add farmer (
BridgeSyncHelper.createIE->Repo.createIE) - IE POST response handler (IEFlatPostRH,
updateIEIds) IeRepositoryImpl
- Legacy setup (IEDTO,
- Read by
- ATM screens
- Certification
- Endorsement
- Farmer option screen (spouse block,
getIeSpouseDetailByIeAliasId) - Sync workers IEWorker, IEIconpicWorker
- Filled from
POST api/setupdata/v2 (IEDTO)- Sync
- appId is a client UUID primary key. syncStatus starts at SYNC_DONE for downloaded rows, becomes SYNC_NOT_INITIALIZED when the row is created or edited on the device, and goes back to SYNC_DONE when the response handler writes the server id. opId holds the id of the last queued library operation. Sync entities IE and IE_ICONPIC.
- Source
- data/src/main/java/org/mindtree/app/agricultor/data/entity/IE.kt
Columns
| Column | Type | Null | Key | Meaning |
|---|---|---|---|---|
aliasId | TEXT | Yes | Index | Farmer alias. Unique. Equals ie_flat_entity.uuid. Index: unique. |
iconpic | TEXT | Yes | Profile photo path/URL. | |
id | TEXT | Yes | Server id (stored as TEXT here). | |
interestedInTrade | INTEGER | Yes | 1 if interested in trade. | |
idString | TEXT | Yes | Server id as string. | |
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). | |
iestatus_dataCode | TEXT | Yes | Farmer status code. | |
onboardedtenant_loginName | TEXT | Yes | Onboarding tenant: login name. | |
onboardedtenant_id | INTEGER | Yes | Server id of the embedded object. | |
person_id | INTEGER | Yes | Server id of the embedded object. | |
person_notes | TEXT | Yes | Current farmer category (the part after "/" of the full category), e.g. Farmer, C4 (Non-Agri), C5 (POP). | |
person_aliasId | TEXT | Yes | Same as ie.aliasId (farmer alias). | |
person_personprofile_lastName | TEXT | Yes | Everything after the first word of the farmer name. | |
person_personprofile_occupation | TEXT | Yes | Occupation typed on the Add farmer form (defaults to "Farming"). | |
person_personprofile_caste | TEXT | Yes | No description in code. | |
person_personprofile_noOfChildren | INTEGER | Yes | Number of children. | |
person_personprofile_dateOfBirth | TEXT | Yes | No description in code. | |
person_personprofile_religion | TEXT | Yes | No description in code. | |
person_personprofile_firstName | TEXT | Yes | First word of the farmer name. | |
person_personprofile_middleName | TEXT | Yes | No description in code. | |
person_personprofile_id | INTEGER | Yes | Server id of the embedded object. | |
person_personprofile_age | INTEGER | Yes | Age in years (sent with ageAsOnDate = time of save). | |
person_personprofile_notes | TEXT | Yes | Farmer category as "baseCategory/currentCategory" text, e.g. "C1 (2021–22)/Farmer". The part after "/" drives the C4 / C5 / Farmer checks. | |
person_personprofile_inActiveReason | TEXT | Yes | Why the farmer is inactive: an INACTIVE_REASON.* code (e.g. INACTIVE_REASON.DEAD) or free text for "other". | |
person_personprofile_gapStartDate | TEXT | Yes | Date the current farmer category was last changed, ISO-8601 local time "yyyy-MM-ddTHH:mm:ss". Reset when the category changes on the Add farmer screen. | |
person_personprofile_lifestatus_dataCode | TEXT | Yes | Reference data code. | |
person_personprofile_gender_dataCode | TEXT | Yes | Reference data code. | |
person_personprofile_disabilitystatus_dataCode | TEXT | Yes | Reference data code. | |
person_personprofile_avgmonthlyincome_id | INTEGER | Yes | Server id of the embedded object. | |
person_personprofile_avgmonthlyincome_value | INTEGER | Yes | Numeric quantity value (flattened embedded quantity). | |
person_personprofile_avgmonthlyincome_currency_code | TEXT | Yes | Reference data code. | |
person_personprofile_bloodgroup_dataCode | TEXT | Yes | Reference data code. | |
person_personprofile_salutation_dataCode | TEXT | Yes | Reference data code. | |
person_personprofile_maritalstatus_dataCode | TEXT | Yes | Reference data code. | |
person_personprofile_category_dataCode | TEXT | Yes | Reference data code. | |
caretakertenant_loginName | TEXT | Yes | Login name of the logged-in user's tenant (default "ap.gov"). | |
caretakertenant_id | INTEGER | Yes | Server id of the embedded object. |
Notes
- Has six child tables (ie_ietagging, ie_person_*), linked by iEId = ie.appId with no FK and no index.
- The response handler updates child server ids by matching dataCode.
- loadAllIEData joins ie to ie_flat_entity on uuid = aliasId but is unused.