endorsement_comment_entity
Comment thread on an endorsement. Also stores server notifications (commentType = NOTIFICATIONS).
Table factsheetagri_db
- Written by
FetchCommentsNotificationWorker(Repo.saveComments)- Post comment (
createEndorsementComment)
- Read by
- Comment thread (
getCommentListForId, by timestamp ASC) - Notification list (
getNotifications)
- Comment thread (
- Filled from
GET gateway/asset-service/api/v1/endorsementComment- Sync
- No BaseEntity flags. New comments are queued in sync_ledger as ENDORSEMENT_COMMENT.
- Source
- data/src/main/java/org/mindtree/app/agricultor/data/sync/entity/EndorsementCommentEntity.kt
Columns
| Column | Type | Null | Key | Meaning |
|---|---|---|---|---|
id | INTEGER | Yes | Server id. Null or 0 until the row is synced. | |
entityType | TEXT | Yes | Type of the endorsed entity: ENTITY.TYPE.VO | ENTITY.TYPE.SHG | ENTITY.TYPE.FARMER. | |
entityId | TEXT | Yes | FK → endorsement_entity.entityId | Entity id. Link by convention only, no FK constraint. |
entityCode | TEXT | Yes | No description in code. | |
postedBy | TEXT | Yes | Author. | |
timestamp | INTEGER | Yes | When the comment was posted (epoch millis). | |
description | TEXT | Yes | Comment text. | |
uuid | TEXT | No | PK | Primary key. |
commentType | TEXT | Yes | NOTIFICATIONS for server notifications, otherwise an endorsement comment. |
Notes
- Two notification stores exist: this table and legacy notifications (FCM).
- Missing index on entityId.