mandi

This table contains all the list of mandis in the Bolbhav database and their associated attributes.

Model

FieldTypeNullableDefault value

id

int4

mandi_name

varchar(80)

registration_date

timestamp

Current date

is_active

bool

True

district

varchar(80)

state

varchar(80)

pincode

int4

district_hi

varchar(100)

state_hi

varchar(100)

district_id

int4

mandi_name_hi

varchar(80)

state_id

int4

manager_ids

_int4

gov_name

varchar

gov_name_hi

varchar

latest_update

timestamp

stats

json

whatsapp_code

int4

name_mt

varchar

broadcast_timestamp

timestamp

name_pb

varchar

is_crowd_sourced

bool

created_at

timestamp

updated_at

timestamp

is_bolbhav_plus

bool

Description of fields used in Bolbhav App

id

Primary key of the table.

is_active

This store whether we are still using this mandi_id. In mandi table it is restricted to delete a row because there might be dependecies in mandi_price table. Hence, a row can be marked inactive instead by making is_active False.

is_bolbhav_plus

If this is true then the mandi name is visible on the Bolbhav Android App and Bolbhav Plus Webapp.

is_crowdsourced

This was used during the Bolbhav Chhindwara experiment and not is use anymore.


mandi_name

english name of the mandi

mandi_name_hi

Hindi name of the mandi

name_mt

Marathi name of the mandi

name_pb

Punjabi name of the mandi

gov_name

Name of the mandi in government records e.g Agmarknet.

gov_name_hi

Hindi name of the mandi in government records e.g Agmarknet.


district_id, district, district_hi

Tells about the district's id, district's english name, and district's Hindi name fromt the address table.

state_id, state, state_hi

Tells about the state's id, state's english name, and state's Hindi name fromt the address table.

pincode

tells the pincode of the mandi

registration_date

the day the mandi is added in the table

created_at

Later this field is added to capture the timestamp of row addition. The registration_date can be deleted.

updated_at

timestamp at which the row was last updated.

latest_update

date for which the last prices were updated in the mandi_price table from the government sources. This table was used in the Bolbhav chatbot and not used in Android or the webapp. The Bolbhav website use this table to show the prices.

broadcast_timestamp

During the WhatsApp Chatbot, a cron job used to run and send a message on WhatsApp whenever the prices for a mandi is updated in the mandi_price table. This filed store the timestamp of the last broadcast message.

manager_ids

On the WhatsApp chatbot, we allowed verified users who were mandi officials to update the prices directly in the Bolbhav database. This field carries the user_id of all the whitelisted phone numbers that are allowed to update the prices of that mandi. Currently, it is used in the Mandi Price Update Webapp. This is a list field containing multiple user ids with comma-separated.

Last updated