Schema Blueprint
Entity Relationship Diagram
Relational mapping of the core data structures powering GramMarket AI.
USERS
Tableid UUID
email String
role Enum(F, B, A)
kyc_status Boolean
created_at Timestamp
1 : N
PRODUCTS
Tableid UUID
farmer_id UUID
name String
harvest_date Date
expiry_date Date
price_per_kg Decimal
ORDERS
Tableid UUID
buyer_id UUID
product_id UUID
total_weight Decimal
status Enum
TRANSACTIONS
Tableid UUID
order_id UUID
amount Decimal
escrow_status String
payment_ref String
DELIVERY
Tableid UUID
order_id UUID
tracking_num String
delivery_fee Decimal
est_arrival Timestamp