compact_block_member
One farmer's PLI (land and crop) enrolled in a compact block.
Table factsheetagri_db
- Written by
- Saved with
compact_block - Compact block farmer selection
CompactBlockMemberDeleteRH
- Saved with
- Read by
- Compact block screens
- PLI picker (blocks PLIs already in another block)
- Filled from
GET gateway/portfolio-service/api/v1/compact-block/filter- 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 entity COMPACT_BLOCK_MEMBER.
- Source
- data/src/main/java/org/mindtree/app/agricultor/data/entity/CompactBlockMember.kt
Columns
| Column | Type | Null | Key | Meaning |
|---|---|---|---|---|
assetCheckSum | TEXT | Yes | Content hash of a land asset. Links this row to the land before the land has a server id. | |
assetCode | TEXT | Yes | Survey number of the land. | |
assetId | INTEGER | Yes | FK → farmerassets.id | Asset id. Link by convention only, no FK constraint. |
id | INTEGER | Yes | Server id. Null or 0 until the row is synced. | |
joiningDate | TEXT | Yes | Date joined the block. | |
leavingDate | TEXT | Yes | Date left the block. | |
titleId | TEXT | Yes | FK → compact_block.titleId | Stable business key shared by all versions of the record. Link by convention only, no FK constraint. |
notes | TEXT | Yes | No description in code. | |
owningEntityId | TEXT | Yes | FK → ie_flat_entity.iEOLTPId | Farmer server id (= ie_flat_entity.iEOLTPId), stored as text. Link by convention only, no FK constraint. |
owningEntityType | TEXT | Yes | Owner type, normally the farmer (IE) entity type. | |
active | INTEGER | Yes | Soft-delete flag (1 = active). | |
inActiveReason | TEXT | Yes | Reason given when the row was deactivated. | |
shgId | TEXT | Yes | SHG of the farmer. | |
vo | TEXT | Yes | VO of the farmer. | |
uuid | TEXT | Yes | Index | Stable business UUID, also sent to the server. Index: unique. |
portfolioLineItemTitleId | TEXT | Yes | FK → portfolio_portfoliolineitem.titleId | Portfolio line item title id. Link by convention only, no FK constraint. |
portfolioLineItemId | INTEGER | Yes | FK → portfolio_portfoliolineitem.id | Portfolio line item id. Link by convention only, no FK constraint. |
portfolioId | INTEGER | Yes | FK → portfolio.id | Portfolio id. Link by convention only, no FK constraint. |
createdByApp | INTEGER | Yes | Audit: app that created/last changed the row. | |
lastModifiedByApp | INTEGER | Yes | Audit: app that created/last changed the row. | |
createdFromDevice | TEXT | Yes | Audit: device id that created/last changed the row. | |
lastUpdatedFromDevice | TEXT | Yes | Audit: device id that created/last changed the row. | |
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). |
Notes
- getCompactBlockMemberListNotInTitleId returns active members of other blocks so that one PLI cannot join two blocks.
- Missing index on titleId (the join column of the relation) and portfolioLineItemTitleId.