portfolio_question_response
Questionnaire answers attached to a PLI (for example seed source or practices).
Table factsheetagri_db
- Written by
- PLI save (deletes then re-inserts all answers)
- Read by
- Portfolio screens
- Filled from
GET /gateway/portfolio-service/api/v1/portfolios/ownerEntities- Sync
- Has BaseEntity flags; sent with the PLI.
- Source
- data/src/main/java/org/mindtree/app/agricultor/data/entity/PortfolioLineItem.kt
Columns
| Column | Type | Null | Key | Meaning |
|---|---|---|---|---|
portfolioLineItemAppId | TEXT | Yes | FK → portfolio_portfoliolineitem.appId | Portfolio line item app id. Link by convention only, no FK constraint. |
id | INTEGER | Yes | Server id. Null or 0 until the row is synced. | |
uuid | TEXT | Yes | Index | Stable business UUID, also sent to the server. Index: unique. |
questionId | INTEGER | Yes | PMDS question number: 1 Type of PMDS, 2 Kits used per acre, 3 Mode of sowing, 4 No of seed varieties sown, 5 Quantity of PMDS seeds used. | |
category | TEXT | No | Question category (required). | |
subCategory | TEXT | Yes | PMDS_TYPE | KITS_USED | MODE_OF_SOWING | SEED_VARIETY | SEEDS_USED. | |
questionType | TEXT | Yes | Answer type. | |
questionCode | TEXT | Yes | Reference data code. | |
questionLabel | TEXT | Yes | English question text, e.g. "Type of PMDS". | |
answerLanguageCode | TEXT | Yes | Reference data code. | |
answerValue | TEXT | Yes | Coded answer. | |
answerLabel | TEXT | Yes | Selected option number ("1" or "2") for single-select questions. | |
answerText | TEXT | Yes | Free-text answer. | |
appCreatedAt | TEXT | Yes | Created on device (epoch millis). Type differs between tables (TEXT vs INTEGER). | |
appLastModifiedAt | TEXT | Yes | Last modified on device (epoch millis). | |
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
- deletePortfolioQuestionResponseByPLIAppId runs on every PLI save.