2248 lines
No EOL
57 KiB
JSON
2248 lines
No EOL
57 KiB
JSON
{
|
|
"id": "efcf7b28-c4d0-4f1a-bcdb-aae980775fd3",
|
|
"prevId": "c74c19b3-5a26-4180-84a5-0af70c776ea6",
|
|
"version": "7",
|
|
"dialect": "postgresql",
|
|
"tables": {
|
|
"mf.addresses": {
|
|
"name": "addresses",
|
|
"schema": "mf",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "integer",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"identity": {
|
|
"type": "always",
|
|
"name": "addresses_id_seq",
|
|
"schema": "mf",
|
|
"increment": "1",
|
|
"startWith": "1",
|
|
"minValue": "1",
|
|
"maxValue": "2147483647",
|
|
"cache": "1",
|
|
"cycle": false
|
|
}
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"phone": {
|
|
"name": "phone",
|
|
"type": "varchar(15)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"address_line1": {
|
|
"name": "address_line1",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"address_line2": {
|
|
"name": "address_line2",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"city": {
|
|
"name": "city",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"state": {
|
|
"name": "state",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"pincode": {
|
|
"name": "pincode",
|
|
"type": "varchar(10)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"is_default": {
|
|
"name": "is_default",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"latitude": {
|
|
"name": "latitude",
|
|
"type": "real",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"longitude": {
|
|
"name": "longitude",
|
|
"type": "real",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"addresses_user_id_users_id_fk": {
|
|
"name": "addresses_user_id_users_id_fk",
|
|
"tableFrom": "addresses",
|
|
"tableTo": "users",
|
|
"schemaTo": "mf",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"mf.cart_items": {
|
|
"name": "cart_items",
|
|
"schema": "mf",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "integer",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"identity": {
|
|
"type": "always",
|
|
"name": "cart_items_id_seq",
|
|
"schema": "mf",
|
|
"increment": "1",
|
|
"startWith": "1",
|
|
"minValue": "1",
|
|
"maxValue": "2147483647",
|
|
"cache": "1",
|
|
"cycle": false
|
|
}
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"product_id": {
|
|
"name": "product_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"quantity": {
|
|
"name": "quantity",
|
|
"type": "numeric(10, 2)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"added_at": {
|
|
"name": "added_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"cart_items_user_id_users_id_fk": {
|
|
"name": "cart_items_user_id_users_id_fk",
|
|
"tableFrom": "cart_items",
|
|
"tableTo": "users",
|
|
"schemaTo": "mf",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
},
|
|
"cart_items_product_id_product_info_id_fk": {
|
|
"name": "cart_items_product_id_product_info_id_fk",
|
|
"tableFrom": "cart_items",
|
|
"tableTo": "product_info",
|
|
"schemaTo": "mf",
|
|
"columnsFrom": [
|
|
"product_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"unique_user_product": {
|
|
"name": "unique_user_product",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"user_id",
|
|
"product_id"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"mf.complaints": {
|
|
"name": "complaints",
|
|
"schema": "mf",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "integer",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"identity": {
|
|
"type": "always",
|
|
"name": "complaints_id_seq",
|
|
"schema": "mf",
|
|
"increment": "1",
|
|
"startWith": "1",
|
|
"minValue": "1",
|
|
"maxValue": "2147483647",
|
|
"cache": "1",
|
|
"cycle": false
|
|
}
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"order_id": {
|
|
"name": "order_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"complaint_body": {
|
|
"name": "complaint_body",
|
|
"type": "varchar(1000)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"response": {
|
|
"name": "response",
|
|
"type": "varchar(1000)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"is_resolved": {
|
|
"name": "is_resolved",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"complaints_user_id_users_id_fk": {
|
|
"name": "complaints_user_id_users_id_fk",
|
|
"tableFrom": "complaints",
|
|
"tableTo": "users",
|
|
"schemaTo": "mf",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
},
|
|
"complaints_order_id_orders_id_fk": {
|
|
"name": "complaints_order_id_orders_id_fk",
|
|
"tableFrom": "complaints",
|
|
"tableTo": "orders",
|
|
"schemaTo": "mf",
|
|
"columnsFrom": [
|
|
"order_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"mf.coupon_usage": {
|
|
"name": "coupon_usage",
|
|
"schema": "mf",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "integer",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"identity": {
|
|
"type": "always",
|
|
"name": "coupon_usage_id_seq",
|
|
"schema": "mf",
|
|
"increment": "1",
|
|
"startWith": "1",
|
|
"minValue": "1",
|
|
"maxValue": "2147483647",
|
|
"cache": "1",
|
|
"cycle": false
|
|
}
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"coupon_id": {
|
|
"name": "coupon_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"used_at": {
|
|
"name": "used_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"coupon_usage_user_id_users_id_fk": {
|
|
"name": "coupon_usage_user_id_users_id_fk",
|
|
"tableFrom": "coupon_usage",
|
|
"tableTo": "users",
|
|
"schemaTo": "mf",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
},
|
|
"coupon_usage_coupon_id_coupons_id_fk": {
|
|
"name": "coupon_usage_coupon_id_coupons_id_fk",
|
|
"tableFrom": "coupon_usage",
|
|
"tableTo": "coupons",
|
|
"schemaTo": "mf",
|
|
"columnsFrom": [
|
|
"coupon_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"mf.coupons": {
|
|
"name": "coupons",
|
|
"schema": "mf",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "integer",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"identity": {
|
|
"type": "always",
|
|
"name": "coupons_id_seq",
|
|
"schema": "mf",
|
|
"increment": "1",
|
|
"startWith": "1",
|
|
"minValue": "1",
|
|
"maxValue": "2147483647",
|
|
"cache": "1",
|
|
"cycle": false
|
|
}
|
|
},
|
|
"coupon_code": {
|
|
"name": "coupon_code",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"is_user_based": {
|
|
"name": "is_user_based",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"discount_percent": {
|
|
"name": "discount_percent",
|
|
"type": "numeric(5, 2)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"flat_discount": {
|
|
"name": "flat_discount",
|
|
"type": "numeric(10, 2)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"min_order": {
|
|
"name": "min_order",
|
|
"type": "numeric(10, 2)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"target_user": {
|
|
"name": "target_user",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"product_ids": {
|
|
"name": "product_ids",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_by": {
|
|
"name": "created_by",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"max_value": {
|
|
"name": "max_value",
|
|
"type": "numeric(10, 2)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"is_apply_for_all": {
|
|
"name": "is_apply_for_all",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"valid_till": {
|
|
"name": "valid_till",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"max_limit_for_user": {
|
|
"name": "max_limit_for_user",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"is_invalidated": {
|
|
"name": "is_invalidated",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"coupons_target_user_users_id_fk": {
|
|
"name": "coupons_target_user_users_id_fk",
|
|
"tableFrom": "coupons",
|
|
"tableTo": "users",
|
|
"schemaTo": "mf",
|
|
"columnsFrom": [
|
|
"target_user"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
},
|
|
"coupons_created_by_staff_users_id_fk": {
|
|
"name": "coupons_created_by_staff_users_id_fk",
|
|
"tableFrom": "coupons",
|
|
"tableTo": "staff_users",
|
|
"schemaTo": "mf",
|
|
"columnsFrom": [
|
|
"created_by"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"unique_coupon_code": {
|
|
"name": "unique_coupon_code",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"coupon_code"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"mf.delivery_slot_info": {
|
|
"name": "delivery_slot_info",
|
|
"schema": "mf",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "integer",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"identity": {
|
|
"type": "always",
|
|
"name": "delivery_slot_info_id_seq",
|
|
"schema": "mf",
|
|
"increment": "1",
|
|
"startWith": "1",
|
|
"minValue": "1",
|
|
"maxValue": "2147483647",
|
|
"cache": "1",
|
|
"cycle": false
|
|
}
|
|
},
|
|
"delivery_time": {
|
|
"name": "delivery_time",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"freeze_time": {
|
|
"name": "freeze_time",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"is_active": {
|
|
"name": "is_active",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"delivery_sequence": {
|
|
"name": "delivery_sequence",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"mf.key_val_store": {
|
|
"name": "key_val_store",
|
|
"schema": "mf",
|
|
"columns": {
|
|
"key": {
|
|
"name": "key",
|
|
"type": "varchar(255)",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"value": {
|
|
"name": "value",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"mf.notif_creds": {
|
|
"name": "notif_creds",
|
|
"schema": "mf",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "integer",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"identity": {
|
|
"type": "always",
|
|
"name": "notif_creds_id_seq",
|
|
"schema": "mf",
|
|
"increment": "1",
|
|
"startWith": "1",
|
|
"minValue": "1",
|
|
"maxValue": "2147483647",
|
|
"cache": "1",
|
|
"cycle": false
|
|
}
|
|
},
|
|
"token": {
|
|
"name": "token",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"added_at": {
|
|
"name": "added_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"last_verified": {
|
|
"name": "last_verified",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"notif_creds_user_id_users_id_fk": {
|
|
"name": "notif_creds_user_id_users_id_fk",
|
|
"tableFrom": "notif_creds",
|
|
"tableTo": "users",
|
|
"schemaTo": "mf",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"notif_creds_token_unique": {
|
|
"name": "notif_creds_token_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"token"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"mf.notifications": {
|
|
"name": "notifications",
|
|
"schema": "mf",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "integer",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"identity": {
|
|
"type": "always",
|
|
"name": "notifications_id_seq",
|
|
"schema": "mf",
|
|
"increment": "1",
|
|
"startWith": "1",
|
|
"minValue": "1",
|
|
"maxValue": "2147483647",
|
|
"cache": "1",
|
|
"cycle": false
|
|
}
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"title": {
|
|
"name": "title",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"body": {
|
|
"name": "body",
|
|
"type": "varchar(512)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"type": {
|
|
"name": "type",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"is_read": {
|
|
"name": "is_read",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"notifications_user_id_users_id_fk": {
|
|
"name": "notifications_user_id_users_id_fk",
|
|
"tableFrom": "notifications",
|
|
"tableTo": "users",
|
|
"schemaTo": "mf",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"mf.order_cancellations": {
|
|
"name": "order_cancellations",
|
|
"schema": "mf",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "integer",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"identity": {
|
|
"type": "always",
|
|
"name": "order_cancellations_id_seq",
|
|
"schema": "mf",
|
|
"increment": "1",
|
|
"startWith": "1",
|
|
"minValue": "1",
|
|
"maxValue": "2147483647",
|
|
"cache": "1",
|
|
"cycle": false
|
|
}
|
|
},
|
|
"order_id": {
|
|
"name": "order_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"reason": {
|
|
"name": "reason",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"cancellation_user_notes": {
|
|
"name": "cancellation_user_notes",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"cancellation_admin_notes": {
|
|
"name": "cancellation_admin_notes",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"cancellation_reviewed": {
|
|
"name": "cancellation_reviewed",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"refund_amount": {
|
|
"name": "refund_amount",
|
|
"type": "numeric(10, 2)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"refund_status": {
|
|
"name": "refund_status",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": "'none'"
|
|
},
|
|
"razorpay_refund_id": {
|
|
"name": "razorpay_refund_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"reviewed_at": {
|
|
"name": "reviewed_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"refund_processed_at": {
|
|
"name": "refund_processed_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"order_cancellations_order_id_orders_id_fk": {
|
|
"name": "order_cancellations_order_id_orders_id_fk",
|
|
"tableFrom": "order_cancellations",
|
|
"tableTo": "orders",
|
|
"schemaTo": "mf",
|
|
"columnsFrom": [
|
|
"order_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
},
|
|
"order_cancellations_user_id_users_id_fk": {
|
|
"name": "order_cancellations_user_id_users_id_fk",
|
|
"tableFrom": "order_cancellations",
|
|
"tableTo": "users",
|
|
"schemaTo": "mf",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"order_cancellations_order_id_unique": {
|
|
"name": "order_cancellations_order_id_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"order_id"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"mf.order_items": {
|
|
"name": "order_items",
|
|
"schema": "mf",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "integer",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"identity": {
|
|
"type": "always",
|
|
"name": "order_items_id_seq",
|
|
"schema": "mf",
|
|
"increment": "1",
|
|
"startWith": "1",
|
|
"minValue": "1",
|
|
"maxValue": "2147483647",
|
|
"cache": "1",
|
|
"cycle": false
|
|
}
|
|
},
|
|
"order_id": {
|
|
"name": "order_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"product_id": {
|
|
"name": "product_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"quantity": {
|
|
"name": "quantity",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"price": {
|
|
"name": "price",
|
|
"type": "numeric(10, 2)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"order_items_order_id_orders_id_fk": {
|
|
"name": "order_items_order_id_orders_id_fk",
|
|
"tableFrom": "order_items",
|
|
"tableTo": "orders",
|
|
"schemaTo": "mf",
|
|
"columnsFrom": [
|
|
"order_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
},
|
|
"order_items_product_id_product_info_id_fk": {
|
|
"name": "order_items_product_id_product_info_id_fk",
|
|
"tableFrom": "order_items",
|
|
"tableTo": "product_info",
|
|
"schemaTo": "mf",
|
|
"columnsFrom": [
|
|
"product_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"mf.order_status": {
|
|
"name": "order_status",
|
|
"schema": "mf",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "integer",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"identity": {
|
|
"type": "always",
|
|
"name": "order_status_id_seq",
|
|
"schema": "mf",
|
|
"increment": "1",
|
|
"startWith": "1",
|
|
"minValue": "1",
|
|
"maxValue": "2147483647",
|
|
"cache": "1",
|
|
"cycle": false
|
|
}
|
|
},
|
|
"order_time": {
|
|
"name": "order_time",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"order_id": {
|
|
"name": "order_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"is_packaged": {
|
|
"name": "is_packaged",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"is_delivered": {
|
|
"name": "is_delivered",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"is_cancelled": {
|
|
"name": "is_cancelled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"cancel_reason": {
|
|
"name": "cancel_reason",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"payment_state": {
|
|
"name": "payment_state",
|
|
"type": "payment_status",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'pending'"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"order_status_user_id_users_id_fk": {
|
|
"name": "order_status_user_id_users_id_fk",
|
|
"tableFrom": "order_status",
|
|
"tableTo": "users",
|
|
"schemaTo": "mf",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
},
|
|
"order_status_order_id_orders_id_fk": {
|
|
"name": "order_status_order_id_orders_id_fk",
|
|
"tableFrom": "order_status",
|
|
"tableTo": "orders",
|
|
"schemaTo": "mf",
|
|
"columnsFrom": [
|
|
"order_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"mf.orders": {
|
|
"name": "orders",
|
|
"schema": "mf",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "integer",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"identity": {
|
|
"type": "always",
|
|
"name": "orders_id_seq",
|
|
"schema": "mf",
|
|
"increment": "1",
|
|
"startWith": "1",
|
|
"minValue": "1",
|
|
"maxValue": "2147483647",
|
|
"cache": "1",
|
|
"cycle": false
|
|
}
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"address_id": {
|
|
"name": "address_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"slot_id": {
|
|
"name": "slot_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"is_cod": {
|
|
"name": "is_cod",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"is_online_payment": {
|
|
"name": "is_online_payment",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"payment_info_id": {
|
|
"name": "payment_info_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"total_amount": {
|
|
"name": "total_amount",
|
|
"type": "numeric(10, 2)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"readable_id": {
|
|
"name": "readable_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"admin_notes": {
|
|
"name": "admin_notes",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"user_notes": {
|
|
"name": "user_notes",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"orders_user_id_users_id_fk": {
|
|
"name": "orders_user_id_users_id_fk",
|
|
"tableFrom": "orders",
|
|
"tableTo": "users",
|
|
"schemaTo": "mf",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
},
|
|
"orders_address_id_addresses_id_fk": {
|
|
"name": "orders_address_id_addresses_id_fk",
|
|
"tableFrom": "orders",
|
|
"tableTo": "addresses",
|
|
"schemaTo": "mf",
|
|
"columnsFrom": [
|
|
"address_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
},
|
|
"orders_slot_id_delivery_slot_info_id_fk": {
|
|
"name": "orders_slot_id_delivery_slot_info_id_fk",
|
|
"tableFrom": "orders",
|
|
"tableTo": "delivery_slot_info",
|
|
"schemaTo": "mf",
|
|
"columnsFrom": [
|
|
"slot_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
},
|
|
"orders_payment_info_id_payment_info_id_fk": {
|
|
"name": "orders_payment_info_id_payment_info_id_fk",
|
|
"tableFrom": "orders",
|
|
"tableTo": "payment_info",
|
|
"schemaTo": "mf",
|
|
"columnsFrom": [
|
|
"payment_info_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"mf.payment_info": {
|
|
"name": "payment_info",
|
|
"schema": "mf",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "integer",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"identity": {
|
|
"type": "always",
|
|
"name": "payment_info_id_seq",
|
|
"schema": "mf",
|
|
"increment": "1",
|
|
"startWith": "1",
|
|
"minValue": "1",
|
|
"maxValue": "2147483647",
|
|
"cache": "1",
|
|
"cycle": false
|
|
}
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"gateway": {
|
|
"name": "gateway",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"order_id": {
|
|
"name": "order_id",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"token": {
|
|
"name": "token",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"merchant_order_id": {
|
|
"name": "merchant_order_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"payload": {
|
|
"name": "payload",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"payment_info_merchant_order_id_unique": {
|
|
"name": "payment_info_merchant_order_id_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"merchant_order_id"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"mf.payments": {
|
|
"name": "payments",
|
|
"schema": "mf",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "integer",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"identity": {
|
|
"type": "always",
|
|
"name": "payments_id_seq",
|
|
"schema": "mf",
|
|
"increment": "1",
|
|
"startWith": "1",
|
|
"minValue": "1",
|
|
"maxValue": "2147483647",
|
|
"cache": "1",
|
|
"cycle": false
|
|
}
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"gateway": {
|
|
"name": "gateway",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"order_id": {
|
|
"name": "order_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"token": {
|
|
"name": "token",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"merchant_order_id": {
|
|
"name": "merchant_order_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"payload": {
|
|
"name": "payload",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"payments_order_id_orders_id_fk": {
|
|
"name": "payments_order_id_orders_id_fk",
|
|
"tableFrom": "payments",
|
|
"tableTo": "orders",
|
|
"schemaTo": "mf",
|
|
"columnsFrom": [
|
|
"order_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"payments_merchant_order_id_unique": {
|
|
"name": "payments_merchant_order_id_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"merchant_order_id"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"mf.product_categories": {
|
|
"name": "product_categories",
|
|
"schema": "mf",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "integer",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"identity": {
|
|
"type": "always",
|
|
"name": "product_categories_id_seq",
|
|
"schema": "mf",
|
|
"increment": "1",
|
|
"startWith": "1",
|
|
"minValue": "1",
|
|
"maxValue": "2147483647",
|
|
"cache": "1",
|
|
"cycle": false
|
|
}
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"mf.product_info": {
|
|
"name": "product_info",
|
|
"schema": "mf",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "integer",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"identity": {
|
|
"type": "always",
|
|
"name": "product_info_id_seq",
|
|
"schema": "mf",
|
|
"increment": "1",
|
|
"startWith": "1",
|
|
"minValue": "1",
|
|
"maxValue": "2147483647",
|
|
"cache": "1",
|
|
"cycle": false
|
|
}
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"short_description": {
|
|
"name": "short_description",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"long_description": {
|
|
"name": "long_description",
|
|
"type": "varchar(1000)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"unit_id": {
|
|
"name": "unit_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"price": {
|
|
"name": "price",
|
|
"type": "numeric(10, 2)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"market_price": {
|
|
"name": "market_price",
|
|
"type": "numeric(10, 2)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"images": {
|
|
"name": "images",
|
|
"type": "jsonb",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"is_out_of_stock": {
|
|
"name": "is_out_of_stock",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"store_id": {
|
|
"name": "store_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"product_info_unit_id_units_id_fk": {
|
|
"name": "product_info_unit_id_units_id_fk",
|
|
"tableFrom": "product_info",
|
|
"tableTo": "units",
|
|
"schemaTo": "mf",
|
|
"columnsFrom": [
|
|
"unit_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
},
|
|
"product_info_store_id_store_info_id_fk": {
|
|
"name": "product_info_store_id_store_info_id_fk",
|
|
"tableFrom": "product_info",
|
|
"tableTo": "store_info",
|
|
"schemaTo": "mf",
|
|
"columnsFrom": [
|
|
"store_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"mf.product_slots": {
|
|
"name": "product_slots",
|
|
"schema": "mf",
|
|
"columns": {
|
|
"product_id": {
|
|
"name": "product_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"slot_id": {
|
|
"name": "slot_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"product_slots_product_id_product_info_id_fk": {
|
|
"name": "product_slots_product_id_product_info_id_fk",
|
|
"tableFrom": "product_slots",
|
|
"tableTo": "product_info",
|
|
"schemaTo": "mf",
|
|
"columnsFrom": [
|
|
"product_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
},
|
|
"product_slots_slot_id_delivery_slot_info_id_fk": {
|
|
"name": "product_slots_slot_id_delivery_slot_info_id_fk",
|
|
"tableFrom": "product_slots",
|
|
"tableTo": "delivery_slot_info",
|
|
"schemaTo": "mf",
|
|
"columnsFrom": [
|
|
"slot_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"product_slot_pk": {
|
|
"name": "product_slot_pk",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"product_id",
|
|
"slot_id"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"mf.special_deals": {
|
|
"name": "special_deals",
|
|
"schema": "mf",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "integer",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"identity": {
|
|
"type": "always",
|
|
"name": "special_deals_id_seq",
|
|
"schema": "mf",
|
|
"increment": "1",
|
|
"startWith": "1",
|
|
"minValue": "1",
|
|
"maxValue": "2147483647",
|
|
"cache": "1",
|
|
"cycle": false
|
|
}
|
|
},
|
|
"product_id": {
|
|
"name": "product_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"quantity": {
|
|
"name": "quantity",
|
|
"type": "numeric(10, 2)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"price": {
|
|
"name": "price",
|
|
"type": "numeric(10, 2)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"valid_till": {
|
|
"name": "valid_till",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"special_deals_product_id_product_info_id_fk": {
|
|
"name": "special_deals_product_id_product_info_id_fk",
|
|
"tableFrom": "special_deals",
|
|
"tableTo": "product_info",
|
|
"schemaTo": "mf",
|
|
"columnsFrom": [
|
|
"product_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"mf.staff_users": {
|
|
"name": "staff_users",
|
|
"schema": "mf",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "integer",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"identity": {
|
|
"type": "always",
|
|
"name": "staff_users_id_seq",
|
|
"schema": "mf",
|
|
"increment": "1",
|
|
"startWith": "1",
|
|
"minValue": "1",
|
|
"maxValue": "2147483647",
|
|
"cache": "1",
|
|
"cycle": false
|
|
}
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"password": {
|
|
"name": "password",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"mf.store_info": {
|
|
"name": "store_info",
|
|
"schema": "mf",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "integer",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"identity": {
|
|
"type": "always",
|
|
"name": "store_info_id_seq",
|
|
"schema": "mf",
|
|
"increment": "1",
|
|
"startWith": "1",
|
|
"minValue": "1",
|
|
"maxValue": "2147483647",
|
|
"cache": "1",
|
|
"cycle": false
|
|
}
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"owner": {
|
|
"name": "owner",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"store_info_owner_staff_users_id_fk": {
|
|
"name": "store_info_owner_staff_users_id_fk",
|
|
"tableFrom": "store_info",
|
|
"tableTo": "staff_users",
|
|
"schemaTo": "mf",
|
|
"columnsFrom": [
|
|
"owner"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"mf.units": {
|
|
"name": "units",
|
|
"schema": "mf",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "integer",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"identity": {
|
|
"type": "always",
|
|
"name": "units_id_seq",
|
|
"schema": "mf",
|
|
"increment": "1",
|
|
"startWith": "1",
|
|
"minValue": "1",
|
|
"maxValue": "2147483647",
|
|
"cache": "1",
|
|
"cycle": false
|
|
}
|
|
},
|
|
"short_notation": {
|
|
"name": "short_notation",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"full_name": {
|
|
"name": "full_name",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"unique_short_notation": {
|
|
"name": "unique_short_notation",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"short_notation"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"mf.user_creds": {
|
|
"name": "user_creds",
|
|
"schema": "mf",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "integer",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"identity": {
|
|
"type": "always",
|
|
"name": "user_creds_id_seq",
|
|
"schema": "mf",
|
|
"increment": "1",
|
|
"startWith": "1",
|
|
"minValue": "1",
|
|
"maxValue": "2147483647",
|
|
"cache": "1",
|
|
"cycle": false
|
|
}
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"user_password": {
|
|
"name": "user_password",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"user_creds_user_id_users_id_fk": {
|
|
"name": "user_creds_user_id_users_id_fk",
|
|
"tableFrom": "user_creds",
|
|
"tableTo": "users",
|
|
"schemaTo": "mf",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"mf.user_details": {
|
|
"name": "user_details",
|
|
"schema": "mf",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "integer",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"identity": {
|
|
"type": "always",
|
|
"name": "user_details_id_seq",
|
|
"schema": "mf",
|
|
"increment": "1",
|
|
"startWith": "1",
|
|
"minValue": "1",
|
|
"maxValue": "2147483647",
|
|
"cache": "1",
|
|
"cycle": false
|
|
}
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"bio": {
|
|
"name": "bio",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"date_of_birth": {
|
|
"name": "date_of_birth",
|
|
"type": "date",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"gender": {
|
|
"name": "gender",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"occupation": {
|
|
"name": "occupation",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"profile_image": {
|
|
"name": "profile_image",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"user_details_user_id_users_id_fk": {
|
|
"name": "user_details_user_id_users_id_fk",
|
|
"tableFrom": "user_details",
|
|
"tableTo": "users",
|
|
"schemaTo": "mf",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"user_details_user_id_unique": {
|
|
"name": "user_details_user_id_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"user_id"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"mf.users": {
|
|
"name": "users",
|
|
"schema": "mf",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "integer",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"identity": {
|
|
"type": "always",
|
|
"name": "users_id_seq",
|
|
"schema": "mf",
|
|
"increment": "1",
|
|
"startWith": "1",
|
|
"minValue": "1",
|
|
"maxValue": "2147483647",
|
|
"cache": "1",
|
|
"cycle": false
|
|
}
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"email": {
|
|
"name": "email",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"mobile": {
|
|
"name": "mobile",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"unique_email": {
|
|
"name": "unique_email",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"email"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"mf.vendor_snippets": {
|
|
"name": "vendor_snippets",
|
|
"schema": "mf",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "integer",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"identity": {
|
|
"type": "always",
|
|
"name": "vendor_snippets_id_seq",
|
|
"schema": "mf",
|
|
"increment": "1",
|
|
"startWith": "1",
|
|
"minValue": "1",
|
|
"maxValue": "2147483647",
|
|
"cache": "1",
|
|
"cycle": false
|
|
}
|
|
},
|
|
"snippet_code": {
|
|
"name": "snippet_code",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"slot_id": {
|
|
"name": "slot_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"product_ids": {
|
|
"name": "product_ids",
|
|
"type": "integer[]",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"valid_till": {
|
|
"name": "valid_till",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"vendor_snippets_slot_id_delivery_slot_info_id_fk": {
|
|
"name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
|
|
"tableFrom": "vendor_snippets",
|
|
"tableTo": "delivery_slot_info",
|
|
"schemaTo": "mf",
|
|
"columnsFrom": [
|
|
"slot_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"vendor_snippets_snippet_code_unique": {
|
|
"name": "vendor_snippets_snippet_code_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"snippet_code"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
}
|
|
},
|
|
"enums": {
|
|
"public.payment_status": {
|
|
"name": "payment_status",
|
|
"schema": "public",
|
|
"values": [
|
|
"pending",
|
|
"success",
|
|
"cod",
|
|
"failed"
|
|
]
|
|
}
|
|
},
|
|
"schemas": {},
|
|
"sequences": {},
|
|
"roles": {},
|
|
"policies": {},
|
|
"views": {},
|
|
"_meta": {
|
|
"columns": {},
|
|
"schemas": {},
|
|
"tables": {}
|
|
}
|
|
} |