diff --git a/apps/backend/assets/signed-url-cache.json b/apps/backend/assets/signed-url-cache.json index 90e713b..5c855b5 100644 --- a/apps/backend/assets/signed-url-cache.json +++ b/apps/backend/assets/signed-url-cache.json @@ -1 +1 @@ -{"originalToSigned":{"store-images/1770281046297.jpg":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/store-images/1770281046297.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260309%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260309T193417Z&X-Amz-Expires=259200&X-Amz-Signature=271c0272ba9048bfd6785da9284c96ed15cd8f139aac094acc8883513c9adcb1&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773343997623},"store-images/1770429593455.jpg":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/store-images/1770429593455.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260309%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260309T193417Z&X-Amz-Expires=259200&X-Amz-Signature=e28f8c17df312e020caad9b63a4af47d1c299be263bf6a2289e1755ce37a5f46&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773343997623},"tags/1773132996598-1773119837289-8c93f343-2885-415e-b545-dcaa1dc88857.jpeg%3FX-Amz-Algorithm%3DAWS4-HMAC-SHA256%26X-Amz-Content-Sha256%3DUNSIGNED-PAYLOAD%26X-Amz-Credential%3D8fab47503efb9547b50e4fb317e35cc7%252F20260310%252Fapac%252Fs3%252Faws4_request%26X-Amz-Date%3D20260310T051718Z%26X-Amz-Expires%3D259200%26X-Amz-Signature%3D22358087a6f102caf7eb7a4b3cfd455df9aca13685fff8bb751d3c3d813b9d72%26X-Amz-SignedHeaders%3Dhost%26x-amz-checksum-mode%3DENABLED%26x-id%3DGetObject":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/tags/1773132996598-1773119837289-8c93f343-2885-415e-b545-dcaa1dc88857.jpeg%253FX-Amz-Algorithm%253DAWS4-HMAC-SHA256%2526X-Amz-Content-Sha256%253DUNSIGNED-PAYLOAD%2526X-Amz-Credential%253D8fab47503efb9547b50e4fb317e35cc7%25252F20260310%25252Fapac%25252Fs3%25252Faws4_request%2526X-Amz-Date%253D20260310T051718Z%2526X-Amz-Expires%253D259200%2526X-Amz-Signature%253D22358087a6f102caf7eb7a4b3cfd455df9aca13685fff8bb751d3c3d813b9d72%2526X-Amz-SignedHeaders%253Dhost%2526x-amz-checksum-mode%253DENABLED%2526x-id%253DGetObject?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260310%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260310T091443Z&X-Amz-Expires=259200&X-Amz-Signature=b107b388b2c1507b70d611c1c91dcdda5450083e7f8888ad99572b770b7efcf1&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773393223027},"profile-images/1766160314135-1000000018.jpg":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/profile-images/1766160314135-1000000018.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260310%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260310T091448Z&X-Amz-Expires=259200&X-Amz-Signature=e2595e57f41d7b66b08c23ab6a5a89631eb9c69c323dd558743938e7673cceda&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773393228306},"tags/1763835253683-c9c3e293-0bef-4c58-a976-dd49c050cd36.jpeg":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/tags/1763835253683-c9c3e293-0bef-4c58-a976-dd49c050cd36.jpeg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260311%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260311T110957Z&X-Amz-Expires=259200&X-Amz-Signature=367a176f8a688457d85db22252a80caabb39a1bdd63ea3cdc72f66bf9af29a01&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773486537225},"tags/1763835293899-43b3fbe1-9b5b-441c-b4d4-d1691c3f02f3.webp":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/tags/1763835293899-43b3fbe1-9b5b-441c-b4d4-d1691c3f02f3.webp?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260311%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260311T110957Z&X-Amz-Expires=259200&X-Amz-Signature=437a86c8b956eda8929f72ce76d19bc510463774d5a7c20b09ff84c228ae90c1&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773486537444},"tags/1768709725124-ebf421c5-ad52-49a9-b65c-1de008110b8a.png":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/tags/1768709725124-ebf421c5-ad52-49a9-b65c-1de008110b8a.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260311%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260311T110957Z&X-Amz-Expires=259200&X-Amz-Signature=12c0135edfd884a1df1f0e6baa411804b2ede5824c34148d59eba203a546662f&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773486537653},"tags/1770321659633-1763869265110-e22b6d94-dac9-499f-babb-1e944d90b01a.jpeg%3FX-Amz-Algorithm%3DAWS4-HMAC-SHA256%26X-Amz-Content-Sha256%3DUNSIGNED-PAYLOAD%26X-Amz-Credential%3D8fab47503efb9547b50e4fb317e35cc7%252F20260205%252Fapac%252Fs3%252Faws4_request%26X-Amz-Date%3D20260205T195535Z%26X-Amz-Expires%3D259200%26X-Amz-Signature%3D917db15bcc60cab7ac5cd5e49d85d13a960fe77b4a5e327dd449048870494cf9%26X-Amz-SignedHeaders%3Dhost%26x-amz-checksum-mode%3DENABLED%26x-id%3DGetObject":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/tags/1770321659633-1763869265110-e22b6d94-dac9-499f-babb-1e944d90b01a.jpeg%253FX-Amz-Algorithm%253DAWS4-HMAC-SHA256%2526X-Amz-Content-Sha256%253DUNSIGNED-PAYLOAD%2526X-Amz-Credential%253D8fab47503efb9547b50e4fb317e35cc7%25252F20260205%25252Fapac%25252Fs3%25252Faws4_request%2526X-Amz-Date%253D20260205T195535Z%2526X-Amz-Expires%253D259200%2526X-Amz-Signature%253D917db15bcc60cab7ac5cd5e49d85d13a960fe77b4a5e327dd449048870494cf9%2526X-Amz-SignedHeaders%253Dhost%2526x-amz-checksum-mode%253DENABLED%2526x-id%253DGetObject?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260311%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260311T110957Z&X-Amz-Expires=259200&X-Amz-Signature=0ffa59d8343863e574d71cb6cbf244436ef634e5a543cc925e0425e8a1b513a5&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773486537862},"tags/1770323410499-1763869436182-bf82f7b4-a1f3-4113-985b-96311b7a910e.jpeg%3FX-Amz-Algorithm%3DAWS4-HMAC-SHA256%26X-Amz-Content-Sha256%3DUNSIGNED-PAYLOAD%26X-Amz-Credential%3D8fab47503efb9547b50e4fb317e35cc7%252F20260205%252Fapac%252Fs3%252Faws4_request%26X-Amz-Date%3D20260205T202804Z%26X-Amz-Expires%3D259200%26X-Amz-Signature%3Dea436390b277935d843cae6b5cfa62aeed5799cb4a962ab31a0be4b132ca4b30%26X-Amz-SignedHeaders%3Dhost%26x-amz-checksum-mode%3DENABLED%26x-id%3DGetObject":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/tags/1770323410499-1763869436182-bf82f7b4-a1f3-4113-985b-96311b7a910e.jpeg%253FX-Amz-Algorithm%253DAWS4-HMAC-SHA256%2526X-Amz-Content-Sha256%253DUNSIGNED-PAYLOAD%2526X-Amz-Credential%253D8fab47503efb9547b50e4fb317e35cc7%25252F20260205%25252Fapac%25252Fs3%25252Faws4_request%2526X-Amz-Date%253D20260205T202804Z%2526X-Amz-Expires%253D259200%2526X-Amz-Signature%253Dea436390b277935d843cae6b5cfa62aeed5799cb4a962ab31a0be4b132ca4b30%2526X-Amz-SignedHeaders%253Dhost%2526x-amz-checksum-mode%253DENABLED%2526x-id%253DGetObject?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260311%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260311T110958Z&X-Amz-Expires=259200&X-Amz-Signature=989b84cfdf4b05ea954e9f56d1751e33d406c71f0ae1fb877c0884ba188a5b7c&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773486538258},"tags/1770323560823-fd0ec463-bed0-474e-aa14-dc6480ce36af.jpeg":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/tags/1770323560823-fd0ec463-bed0-474e-aa14-dc6480ce36af.jpeg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260311%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260311T110958Z&X-Amz-Expires=259200&X-Amz-Signature=b004857f0563e5bb4694a28f5ec7827f8cf710d31f40ea62c155e9339d79f144&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773486538972},"product-images/1768643354251-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768643354251-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=ef6a17e48db27bb68c01705b91f1b98ac67bd90c2ec7be23236f210ab4e5db93&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1768641988607-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768641988607-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=c4ad1216fc341043ff2d7b4946bcd88dfd4ff8fe530ba601b224930f699cf150&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1768832690994-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768832690994-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=e33eda83f892668e9802fc1fb4af4e3a292bc792cf6e792abba0a4f42d68d686&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1768640936747-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768640936747-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=d604f6610f4448638fa898b97581b2be8f36aaf80b391531ce565dc1e2a21d6a&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1769397372526-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769397372526-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=5f691bce657a514afbce880fa9ad93f810ade4e07867976d5b8a81cd167147be&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1768640009078-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768640009078-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=ea31722e5109b605156a96404ffef72daff6abeb216c424630f8952e28fdd6d5&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1771411526889-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1771411526889-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=2e43db553d19273199cfda5ed46c7d2a776e0f69656c6947f3723da70f98345f&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1768710434326-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768710434326-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=ee3f42d9631fed584125a11874a678fd9d0edec0232357d21f9995dcae02107d&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1768726783083-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768726783083-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=765414504af83b12c74ade7a31d68fce874f0bf005a7dc5f470e62e7b67ba8e1&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1768654740988-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768654740988-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=c7067a891da628bd21b790eb0f9fc12d263ff0e0b160c1e63a3e90cb9ecaf23a&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1768649454994-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768649454994-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=3e3b10a530ae5f0dad8372ec2e88bb91b164dae5a6839252edcd9376a2351062&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1768823985921-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768823985921-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=ae776633db173978d2eb645f2d8dfdb180bbf24c6cdefb0ce077418886688c3e&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1768639645423-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768639645423-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=38daa65706e2bbc6526b84999e2897d7ed65789a1b47d70d42bdb2ec0967c83d&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1768709567040-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768709567040-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=c67b0458cb1c0d8eb9fa0668644f41d843f8d76056894aee0425d385f8b2441f&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1768710760133-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768710760133-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=19b30ce5e842ff6a4107b2076bc033e42f4a1b91068ae3237af560812b24a8ba&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1768712093829-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768712093829-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=c3831ec4adc92f15c908a8719a9a608435efb6e0ea074bafd65bf335900e0517&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1768711261174-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768711261174-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=c87908b3818ceb6ebd4fa41e5d6585c792ab21d188c69dc97d8ef6b132cc7857&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1768484106870-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768484106870-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=b5eabd261483dd1f1958baf9ed44e09ae246cabe57fccc523782ac32ca5c713b&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1768397780093-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768397780093-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=84847c3c2f67df809ab33e9fa067f8fcbe7cd9c0bf181bc4b5ccc9dae8bd0e3d&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1768479562478-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768479562478-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=5d38315a92b35798c73ad442f4c8c3909c262921d381d72ca8d7c8bd00f46a8e&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1768393778962-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768393778962-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=a03381376108fa6f5f49490e53605709d04f35cee253bc9de12a6e0105d77cb1&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1768477813647-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768477813647-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=8efbd85bf92e1961d3f1795c532d59407ec3d34472028a63ae49a3909782b881&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1768477813648-1":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768477813648-1?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=10fe09253f4ea61798ed41e9c002969b0f6b16d02fc86e56c6c9a7d48e87692c&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1768390245969-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768390245969-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=e10a0249d9715b00e53799e24d2cf87b993394ef19d3c8596cb488e690035d9d&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1768413754684-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768413754684-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=caa95e30c478f32f8ef490c2c325ea403c145b101a53e098087d6e38306cd30a&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1768478127128-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768478127128-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=1aa8a9f228c3bb5f2855767b78c14765092453ab12a26cf3cab10b5f26cc8b07&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1768478472220-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768478472220-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=47c398167dc21fdd1f46ef9bf849c8ff821499e4a54897b8535713d668a0a4a5&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1768475599800-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768475599800-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=bc7c90f063e9e6cd05148248c5e2bd938330a0aeb595c030f4d54d7f073b0466&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1768307047191-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768307047191-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=c5fedc8c5ef3646cfcb9e758d986b085f36d866908aeaf133e792d6cd3e5c9ec&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1767637606890-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1767637606890-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=3938c4cb056963960d25cea72d4ef48d2bd9c696436bf82ea906e186ebb73f9c&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1767635527063-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1767635527063-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=8c91a54eee5c2c3963cdec2b990f6965ff72f904be9e99ac4bcdc1fe076bc373&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1773127805418-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1773127805418-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=ab5db4b3178616df27d591995a1161a941a404570d1e1724bab26db6f6bae7bd&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1768718685357-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768718685357-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=afde4548fa52ca278064e0f0a39216deda354faab578e257a110022209a234bf&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1768727264220-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768727264220-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=983dc5bfe3288b9e315376ee82a2e0e73103d4c63fc5f894825ea5f5b49ab0ab&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1771249922306-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1771249922306-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=38358cecf6f1ba6926914cd5abed9e9740ad9e6f046cddb957596ebfccb5680f&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1769063336125-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769063336125-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=2ade945f8d20b3139ff43d1d4a561201e7b2a00562dd1d5e40f031649384e2d6&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1768710099841-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768710099841-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=69e469909196c099f4ce27377d060f9e3477bb1d8f88153f0a6c165d196685d9&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1768713206145-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768713206145-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=19d086e3e27b80cc46c923609023b1a33abfb918f0ad183f6b17ed22492fb156&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1769571978680-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769571978680-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=9005cd6838f68312ec8d61a3e9ca8b16f3a9b14690ddea41817ba10fbdb2f336&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1766636589779-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1766636589779-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=3d74dae63047d2bd14153fda1e2fb5dd2119d291370b8280cb2315f170190642&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1768713886512-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768713886512-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=2f495abab35028f8c0252bd5d55429336e0ea25d0e8113c3db42ce02bb97ee1a&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1768640645444-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768640645444-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=66b7a7a63f7b1d3e885d224324516f63084c882a9874fa40a9d3f7944faed7ec&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1769399617573-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769399617573-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=9c0a94169286e37d91f38b4014dbcf8f07b46839574258831b667b97cb79b84c&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1773129061191-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1773129061191-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=572dbb7dd60e469d2758846d2c34d493c0d3aca7a56dbf6651f176239ede2f14&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616689},"product-images/1773130741608-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1773130741608-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=9599f39beec30a6c696ee701f456a6d5217f05fe0d240b4d2d807aeb3c485269&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616690},"product-images/1773209103816-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1773209103816-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=9032c0c1157de7c4d300eadf0ba6dfddf477b2ecad88185f90cb5c18f046d1c9&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616690},"product-images/1773222507937-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1773222507937-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=77bfd51201ace4f2f8da1480deeff6a71557e04a8b4963cc57bd040b0208245f&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616690},"product-images/1773126524403-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1773126524403-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=1b0c1abeee41df128fce14f1a8986cfcf079ce654d07faf9424608c96e299aec&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616690},"product-images/1773208909509-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1773208909509-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=b2116a692bbd848df535c7085c8af39f8e13567ecb3fc2439cf94def45119201&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616690},"product-images/1773128056033-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1773128056033-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=30bf71994e81c9614a1cd625ffbe0032b1863de7d7d0afcd38d553a6a982f428&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616690},"product-images/1773224238549-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1773224238549-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=4f0508b36d153a02857b2a0be0f0152329ea2833c57069589ac35bf14df6f760&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616690},"product-images/1773207859878-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1773207859878-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=856678ba8e9943aa3fae9bff9cc43d2a1c75c134232b56691affdca69a7fd684&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616690},"product-images/1773128303272-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1773128303272-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=ddae8d025e8ace66cde1f957162fe9f845c172972c2c285760bb51d30099f411&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616690},"product-images/1773208255512-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1773208255512-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=12c467b1e96b240e959e7dc4bbe02fa37ead9d968f2e180b48a1d962eb617d83&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616690},"product-images/1769063660493-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769063660493-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=fd0553b1e07f5bc6d37502a17a760c41b04ec90279686eb1cfb89f28e4034967&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616690},"product-images/1773129209100-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1773129209100-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=dd2d5b61b51c09e396b41354c6db0369c0d0eb8750d97d8d7be180963f494c66&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616690},"product-images/1773129907627-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1773129907627-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=fc19d750bc7f244400ff9ba2e80c687dc66de50432faa56457f0fa7ef76fa4df&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616690},"product-images/1769571810861-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769571810861-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=c4e1ec262f86a81e706b49c8648432b76b69b18e02bb2b12890d0c678d4e7ed5&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616690},"product-images/1769396724595-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769396724595-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=63ab7dda9c47f0d7cdd914e72e94c0e433e2cfd2119a8d8b8bd3dc84c178406b&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768642455479-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768642455479-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=69fea7dd8249565653e612bef342d6906a274f212bd86c6a69cf477792f19029&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1769241234003-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769241234003-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=0f1f6918dde69086f142fc9e1876920a3d2cc69a248273a6adc8e6dd7f91d9e1&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1773126251435-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1773126251435-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=34232ec21a98b2a58dfb51613a247bcda35417b204e7761c84cfdde837dd63b6&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768653997561-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768653997561-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=40649e785278d1ea20ba4986ec91dff064e8e34a190976e88e0baed326de6794&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1769398710713-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769398710713-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=0b76722c5179ed6d8bf3dd4465cff4b898ef128ea2324d878162e265bac097cc&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768642724520-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768642724520-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=ad18da2bf92a90dd4c7da6a4d1566de3459cad8bc4144475a76260e5d626ba1f&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768646932088-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768646932088-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=4b6f97eba79c38f1c74c86220302df3eea21d7ecdd1b2b1e8a9d848bb027847a&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1769398103853-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769398103853-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=b5b6e3c905a816bc9f8ab51765621036d7eae249bb4d87cdf12b33f23b87b485&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1770212631435-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1770212631435-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=a8aa57eb9509807bd7fc4431daf8acd0ab8645f63012fd66576941a3fb266dcd&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768639090932-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768639090932-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=f0679a2332d7fde3ac5956c451fd24d49417b947b0d8319bbed1ed7458f6ca7e&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768647119198-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768647119198-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=463860fd2fbe2e6f17cff4c2d9c8593747e56c148cf72284f2e31f5afaa111ce&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1769574792720-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769574792720-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=6766ac8eeb77a0c023a741a57462b8055b66e8c9af551d6e39d3adba1b9de157&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1764500702143-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1764500702143-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=9f252805d6a97d77b17dc76f7fef924505fa21f66bd64a15bf27c917c27014dc&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1764500702144-1":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1764500702144-1?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=160ef1148727f77b6e7d10749dcea523d253a21308e410b19100ddb7d0304cf3&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1766406273176-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1766406273176-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=63d5c2745c58b5386eda4bbe1bbd5845e2f4214da9790f92d2d5c148197689eb&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1766406273178-1":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1766406273178-1?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=0b835752d5bd15c1aa71e04cd3f4854c8675a73a420961934ff9650be20c2d30&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1769395184980-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769395184980-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=1b142cb32ac06c0e95a077db5e84d3ae54a580057c120dd02bbfb9d607162087&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768650081183-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768650081183-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=e7a5e66ae1abb7cf0c9edf0494a6a800380e87275405299188b3dd214cd86e76&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768817786453-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768817786453-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=d37033864eb4fd9e666af38a8efe6fbc6edc15bce19bef0e0f232becb9c0e901&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768817786455-1":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768817786455-1?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=df807462edcf412dcc4c04c0455ab9f1361984cbbbdd24f9dda88bd244d80ee8&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768650709484-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768650709484-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=6383456d35171692a9c50ca5eabf4fbb71686e69384a8a38029070489d47ac9d&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768651334320-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768651334320-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=b9e3c691a9fd3f7e4486f7346b1999359577385f00d34102fe5648bde5baba8d&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1767636171845-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1767636171845-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=e001faacdf02472977ddd254102c336b94842674823f3f551bf877250f236e61&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1769356702593-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769356702593-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=bf425c3a3ba525caedfa4b724c2e96b7dff06b11ab4d605033f3a6fd415e02bb&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1769356039418-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769356039418-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=f02e7234c87d1d5f75e3a1072db06602137c94c9cd86b6b452184c5416c2030b&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768834170995-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768834170995-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=af2058a866a15d5e547f090bcafbfeb845a2fd269ec7561b2faffd818a29d7b0&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1769149707440-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769149707440-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=3fb8385c9a22aa3942c4a12e7ec4aee1b57ff8e2298167a41fd913da81325000&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1769151216776-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769151216776-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=de206a3c962feccfbfc14d5faeb70901bb2db91b9fdb95184d36fca0d6240efd&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1770051810386-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1770051810386-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=966f1bd2233600be196a302499a0b4535ea3e477812a936c80cd88e71882d6a8&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1770051959669-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1770051959669-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=ce3bb7df58f809836781e88939b392ebe5cfd805df37f8014ab16b8b0294f60b&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1769353802270-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769353802270-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=8fe82b0c230308d8855b5d450bdb5e020327a6b03f914b67a6b8787194098946&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1767636561867-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1767636561867-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=eb900be2361dba1d435431cd8243ce7dc5c2e3078fec7586d50a17e73f7a9403&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1769150471654-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769150471654-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=d1f4d63fc1913144953c63bcf63391ef460090328d6ceef9b01b89e7fb037ba0&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1769150471655-1":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769150471655-1?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=7b26a2e0579e4f5c630b790ebf80148354554acd08f49ea489e3cbf69911153b&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1769151844424-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769151844424-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=37a30fb90bb4214877d882d271993a860f5705761362acc41690a890a4e598c1&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768641635898-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768641635898-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=49dd19f4d3e0a52f47f94f4c16fc16a878e77b603b538eac1cbdf3a8a600c86d&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1769351976737-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769351976737-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=037725e4f9ad399f80739dbdc2c65d5e461ab7518fec917ec4c9f2270f353c20&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768652061701-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768652061701-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=7fe678b6d580f53ebe3f570f75c0a67da1bd3a57c0f983c5b4f0afd963897465&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768643138910-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768643138910-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=e7d05dce6b57df25be8a9522d95665daf19822cfc55fcf80b8fe8e525924089d&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768651774899-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768651774899-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=b61537df9ac3ee7a57d5344363b4f3a72b3bb32b43d09288f2d3afd612481bfa&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1769576743718-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769576743718-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=243c780a7f95f9fa7e28b9e6014057903251f675b430b788c823e69ee5722566&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768658094891-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768658094891-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=d027dd5368b1e8d54e4f845bf26bde28eedb9b40530a1b4b0af065798b9b52e6&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768639705530-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768639705530-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=81c0ca304e5a51718706435841e9f19479e506b2a98cd2842be4c255ab23c071&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768639707515-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768639707515-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=24c59fbd5835d4e4e3f2294d2b040d085b38b742de79a8bb51eda20b305f9f28&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1769577010969-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769577010969-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=dc8469490a91261ad535da3940b4236e8553ada9b094d06c1b2b52d3a1c0467d&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1769394457296-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769394457296-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=94e8d62b01f0e27d7e58bab0e07b974255a586cc429d0c1598ea4a01e46016f9&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768822893380-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768822893380-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=f19d1a02aa4ebdbf270753570563c96186ddceb93f56d47076482c03b0bca8a1&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768654475850-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768654475850-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=48aca04ef98dddd70250a8577dbbcda0a268a0e8163d71af1eebdf2500d81a8f&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1769571126092-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769571126092-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=f4a4fcc16a6e84b4a597595c093b553dd7da7a0c4d0a27af492bf431a7468491&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1771647812442-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1771647812442-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=a1aa6676e0b6c55291aec43363acefbda9efec4a43f968487233e98d35aaf473&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1769149204037-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769149204037-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=38a9f77881af3c37523a7b8ef5f5a305c1aa01b43daf2a8eeb999b85446e671f&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768640403001-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768640403001-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=44290f5774a34c61c73c4a8edb6ba231e5af081a1b0479ea1abb59c8a08c8c80&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768646295695-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768646295695-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=702c11b88b873bcb782f351a4830a6d517188069095e4b937d6b8e6199607cb3&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1769396046557-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769396046557-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=589aefb2c8be677e765d3d9a7ef23980330cfa303eb4c02048a045a1c35460a7&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768713537512-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768713537512-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=ac7cb348311d0527ff9d17ee0ea78df78c8ec8c0c2aab8c4fc620bb37452b029&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768638795991-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768638795991-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=b08bddf8169794c05fbfb4c69f2d7a6bd2cbf10a3f5c8c7042c647a7fd82c114&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768646744949-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768646744949-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=8f4b95031d2ef6ad010a59e35415b25e5ae92dbd38b2a14a613eed1be4ed086a&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768711919135-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768711919135-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=63d846726af60f7ae8b9b6dce8d6c112339ff0d5b4f850afb3ab03a7fa83a827&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1769063467386-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769063467386-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=229e7b216d5f479daaaace3e2f4c0663c3b446618e6cf885cb02ccebb4dd9f82&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768639292540-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768639292540-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=079ae798658ae7cda9b4c17fe078906f4fad296194b93ca7511e27e95960433c&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768640233068-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768640233068-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=2c447a84a8f46b6ebc75995b18ffe12ad936a307fe5b46797c9c0aa124620c37&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768834996932-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768834996932-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=b38e8e15f47e4f8ca914159d7135721661ebd73b9390a5dd37b1c287c762a8b2&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768653009851-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768653009851-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=573fab8024104315d909d806c11e6684c2072a6eba736b84e8ec542fb9bf8c23&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768649838027-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768649838027-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=664e4c8348b31544ec78324ca5374a2da9091f08492b6fc9f0c6db8f19633f0b&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768712490280-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768712490280-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=a8df1c63e841d1a42fa0bdc93997777d0061a8cdc6e9309674e3c05f23cf7677&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768539930897-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768539930897-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=7b605406f22c1db6e6243ad7ff9714569780c3a4aedbf5202f83be93ba5788e1&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691},"product-images/1768539930899-1":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768539930899-1?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=10d579c2a9db644fab2efffca06a35ea64c1ff354180d9914dc44f6792e3c7be&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1773586616691}},"signedToOriginal":{"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/store-images/1770281046297.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260309%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260309T193417Z&X-Amz-Expires=259200&X-Amz-Signature=271c0272ba9048bfd6785da9284c96ed15cd8f139aac094acc8883513c9adcb1&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"store-images/1770281046297.jpg","expiresAt":1773343997623},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/store-images/1770429593455.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260309%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260309T193417Z&X-Amz-Expires=259200&X-Amz-Signature=e28f8c17df312e020caad9b63a4af47d1c299be263bf6a2289e1755ce37a5f46&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"store-images/1770429593455.jpg","expiresAt":1773343997623},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/tags/1773132996598-1773119837289-8c93f343-2885-415e-b545-dcaa1dc88857.jpeg%253FX-Amz-Algorithm%253DAWS4-HMAC-SHA256%2526X-Amz-Content-Sha256%253DUNSIGNED-PAYLOAD%2526X-Amz-Credential%253D8fab47503efb9547b50e4fb317e35cc7%25252F20260310%25252Fapac%25252Fs3%25252Faws4_request%2526X-Amz-Date%253D20260310T051718Z%2526X-Amz-Expires%253D259200%2526X-Amz-Signature%253D22358087a6f102caf7eb7a4b3cfd455df9aca13685fff8bb751d3c3d813b9d72%2526X-Amz-SignedHeaders%253Dhost%2526x-amz-checksum-mode%253DENABLED%2526x-id%253DGetObject?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260310%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260310T091443Z&X-Amz-Expires=259200&X-Amz-Signature=b107b388b2c1507b70d611c1c91dcdda5450083e7f8888ad99572b770b7efcf1&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"tags/1773132996598-1773119837289-8c93f343-2885-415e-b545-dcaa1dc88857.jpeg%3FX-Amz-Algorithm%3DAWS4-HMAC-SHA256%26X-Amz-Content-Sha256%3DUNSIGNED-PAYLOAD%26X-Amz-Credential%3D8fab47503efb9547b50e4fb317e35cc7%252F20260310%252Fapac%252Fs3%252Faws4_request%26X-Amz-Date%3D20260310T051718Z%26X-Amz-Expires%3D259200%26X-Amz-Signature%3D22358087a6f102caf7eb7a4b3cfd455df9aca13685fff8bb751d3c3d813b9d72%26X-Amz-SignedHeaders%3Dhost%26x-amz-checksum-mode%3DENABLED%26x-id%3DGetObject","expiresAt":1773393223027},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/profile-images/1766160314135-1000000018.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260310%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260310T091448Z&X-Amz-Expires=259200&X-Amz-Signature=e2595e57f41d7b66b08c23ab6a5a89631eb9c69c323dd558743938e7673cceda&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"profile-images/1766160314135-1000000018.jpg","expiresAt":1773393228306},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/tags/1763835253683-c9c3e293-0bef-4c58-a976-dd49c050cd36.jpeg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260311%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260311T110957Z&X-Amz-Expires=259200&X-Amz-Signature=367a176f8a688457d85db22252a80caabb39a1bdd63ea3cdc72f66bf9af29a01&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"tags/1763835253683-c9c3e293-0bef-4c58-a976-dd49c050cd36.jpeg","expiresAt":1773486537225},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/tags/1763835293899-43b3fbe1-9b5b-441c-b4d4-d1691c3f02f3.webp?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260311%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260311T110957Z&X-Amz-Expires=259200&X-Amz-Signature=437a86c8b956eda8929f72ce76d19bc510463774d5a7c20b09ff84c228ae90c1&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"tags/1763835293899-43b3fbe1-9b5b-441c-b4d4-d1691c3f02f3.webp","expiresAt":1773486537444},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/tags/1768709725124-ebf421c5-ad52-49a9-b65c-1de008110b8a.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260311%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260311T110957Z&X-Amz-Expires=259200&X-Amz-Signature=12c0135edfd884a1df1f0e6baa411804b2ede5824c34148d59eba203a546662f&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"tags/1768709725124-ebf421c5-ad52-49a9-b65c-1de008110b8a.png","expiresAt":1773486537653},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/tags/1770321659633-1763869265110-e22b6d94-dac9-499f-babb-1e944d90b01a.jpeg%253FX-Amz-Algorithm%253DAWS4-HMAC-SHA256%2526X-Amz-Content-Sha256%253DUNSIGNED-PAYLOAD%2526X-Amz-Credential%253D8fab47503efb9547b50e4fb317e35cc7%25252F20260205%25252Fapac%25252Fs3%25252Faws4_request%2526X-Amz-Date%253D20260205T195535Z%2526X-Amz-Expires%253D259200%2526X-Amz-Signature%253D917db15bcc60cab7ac5cd5e49d85d13a960fe77b4a5e327dd449048870494cf9%2526X-Amz-SignedHeaders%253Dhost%2526x-amz-checksum-mode%253DENABLED%2526x-id%253DGetObject?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260311%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260311T110957Z&X-Amz-Expires=259200&X-Amz-Signature=0ffa59d8343863e574d71cb6cbf244436ef634e5a543cc925e0425e8a1b513a5&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"tags/1770321659633-1763869265110-e22b6d94-dac9-499f-babb-1e944d90b01a.jpeg%3FX-Amz-Algorithm%3DAWS4-HMAC-SHA256%26X-Amz-Content-Sha256%3DUNSIGNED-PAYLOAD%26X-Amz-Credential%3D8fab47503efb9547b50e4fb317e35cc7%252F20260205%252Fapac%252Fs3%252Faws4_request%26X-Amz-Date%3D20260205T195535Z%26X-Amz-Expires%3D259200%26X-Amz-Signature%3D917db15bcc60cab7ac5cd5e49d85d13a960fe77b4a5e327dd449048870494cf9%26X-Amz-SignedHeaders%3Dhost%26x-amz-checksum-mode%3DENABLED%26x-id%3DGetObject","expiresAt":1773486537862},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/tags/1770323410499-1763869436182-bf82f7b4-a1f3-4113-985b-96311b7a910e.jpeg%253FX-Amz-Algorithm%253DAWS4-HMAC-SHA256%2526X-Amz-Content-Sha256%253DUNSIGNED-PAYLOAD%2526X-Amz-Credential%253D8fab47503efb9547b50e4fb317e35cc7%25252F20260205%25252Fapac%25252Fs3%25252Faws4_request%2526X-Amz-Date%253D20260205T202804Z%2526X-Amz-Expires%253D259200%2526X-Amz-Signature%253Dea436390b277935d843cae6b5cfa62aeed5799cb4a962ab31a0be4b132ca4b30%2526X-Amz-SignedHeaders%253Dhost%2526x-amz-checksum-mode%253DENABLED%2526x-id%253DGetObject?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260311%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260311T110958Z&X-Amz-Expires=259200&X-Amz-Signature=989b84cfdf4b05ea954e9f56d1751e33d406c71f0ae1fb877c0884ba188a5b7c&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"tags/1770323410499-1763869436182-bf82f7b4-a1f3-4113-985b-96311b7a910e.jpeg%3FX-Amz-Algorithm%3DAWS4-HMAC-SHA256%26X-Amz-Content-Sha256%3DUNSIGNED-PAYLOAD%26X-Amz-Credential%3D8fab47503efb9547b50e4fb317e35cc7%252F20260205%252Fapac%252Fs3%252Faws4_request%26X-Amz-Date%3D20260205T202804Z%26X-Amz-Expires%3D259200%26X-Amz-Signature%3Dea436390b277935d843cae6b5cfa62aeed5799cb4a962ab31a0be4b132ca4b30%26X-Amz-SignedHeaders%3Dhost%26x-amz-checksum-mode%3DENABLED%26x-id%3DGetObject","expiresAt":1773486538258},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/tags/1770323560823-fd0ec463-bed0-474e-aa14-dc6480ce36af.jpeg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260311%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260311T110958Z&X-Amz-Expires=259200&X-Amz-Signature=b004857f0563e5bb4694a28f5ec7827f8cf710d31f40ea62c155e9339d79f144&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"tags/1770323560823-fd0ec463-bed0-474e-aa14-dc6480ce36af.jpeg","expiresAt":1773486538972},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768643354251-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=ef6a17e48db27bb68c01705b91f1b98ac67bd90c2ec7be23236f210ab4e5db93&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768643354251-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768641988607-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=c4ad1216fc341043ff2d7b4946bcd88dfd4ff8fe530ba601b224930f699cf150&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768641988607-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768832690994-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=e33eda83f892668e9802fc1fb4af4e3a292bc792cf6e792abba0a4f42d68d686&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768832690994-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768640936747-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=d604f6610f4448638fa898b97581b2be8f36aaf80b391531ce565dc1e2a21d6a&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768640936747-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769397372526-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=5f691bce657a514afbce880fa9ad93f810ade4e07867976d5b8a81cd167147be&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1769397372526-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768640009078-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=ea31722e5109b605156a96404ffef72daff6abeb216c424630f8952e28fdd6d5&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768640009078-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1771411526889-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=2e43db553d19273199cfda5ed46c7d2a776e0f69656c6947f3723da70f98345f&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1771411526889-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768710434326-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=ee3f42d9631fed584125a11874a678fd9d0edec0232357d21f9995dcae02107d&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768710434326-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768726783083-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=765414504af83b12c74ade7a31d68fce874f0bf005a7dc5f470e62e7b67ba8e1&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768726783083-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768654740988-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=c7067a891da628bd21b790eb0f9fc12d263ff0e0b160c1e63a3e90cb9ecaf23a&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768654740988-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768649454994-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=3e3b10a530ae5f0dad8372ec2e88bb91b164dae5a6839252edcd9376a2351062&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768649454994-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768823985921-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=ae776633db173978d2eb645f2d8dfdb180bbf24c6cdefb0ce077418886688c3e&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768823985921-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768639645423-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=38daa65706e2bbc6526b84999e2897d7ed65789a1b47d70d42bdb2ec0967c83d&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768639645423-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768709567040-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=c67b0458cb1c0d8eb9fa0668644f41d843f8d76056894aee0425d385f8b2441f&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768709567040-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768710760133-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=19b30ce5e842ff6a4107b2076bc033e42f4a1b91068ae3237af560812b24a8ba&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768710760133-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768712093829-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=c3831ec4adc92f15c908a8719a9a608435efb6e0ea074bafd65bf335900e0517&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768712093829-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768711261174-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=c87908b3818ceb6ebd4fa41e5d6585c792ab21d188c69dc97d8ef6b132cc7857&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768711261174-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768484106870-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=b5eabd261483dd1f1958baf9ed44e09ae246cabe57fccc523782ac32ca5c713b&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768484106870-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768397780093-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=84847c3c2f67df809ab33e9fa067f8fcbe7cd9c0bf181bc4b5ccc9dae8bd0e3d&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768397780093-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768479562478-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=5d38315a92b35798c73ad442f4c8c3909c262921d381d72ca8d7c8bd00f46a8e&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768479562478-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768393778962-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=a03381376108fa6f5f49490e53605709d04f35cee253bc9de12a6e0105d77cb1&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768393778962-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768477813647-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=8efbd85bf92e1961d3f1795c532d59407ec3d34472028a63ae49a3909782b881&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768477813647-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768477813648-1?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=10fe09253f4ea61798ed41e9c002969b0f6b16d02fc86e56c6c9a7d48e87692c&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768477813648-1","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768390245969-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=e10a0249d9715b00e53799e24d2cf87b993394ef19d3c8596cb488e690035d9d&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768390245969-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768413754684-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=caa95e30c478f32f8ef490c2c325ea403c145b101a53e098087d6e38306cd30a&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768413754684-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768478127128-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=1aa8a9f228c3bb5f2855767b78c14765092453ab12a26cf3cab10b5f26cc8b07&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768478127128-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768478472220-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=47c398167dc21fdd1f46ef9bf849c8ff821499e4a54897b8535713d668a0a4a5&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768478472220-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768475599800-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=bc7c90f063e9e6cd05148248c5e2bd938330a0aeb595c030f4d54d7f073b0466&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768475599800-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768307047191-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=c5fedc8c5ef3646cfcb9e758d986b085f36d866908aeaf133e792d6cd3e5c9ec&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768307047191-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1767637606890-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=3938c4cb056963960d25cea72d4ef48d2bd9c696436bf82ea906e186ebb73f9c&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1767637606890-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1767635527063-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=8c91a54eee5c2c3963cdec2b990f6965ff72f904be9e99ac4bcdc1fe076bc373&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1767635527063-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1773127805418-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=ab5db4b3178616df27d591995a1161a941a404570d1e1724bab26db6f6bae7bd&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1773127805418-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768718685357-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=afde4548fa52ca278064e0f0a39216deda354faab578e257a110022209a234bf&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768718685357-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768727264220-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=983dc5bfe3288b9e315376ee82a2e0e73103d4c63fc5f894825ea5f5b49ab0ab&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768727264220-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1771249922306-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=38358cecf6f1ba6926914cd5abed9e9740ad9e6f046cddb957596ebfccb5680f&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1771249922306-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769063336125-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=2ade945f8d20b3139ff43d1d4a561201e7b2a00562dd1d5e40f031649384e2d6&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1769063336125-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768710099841-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=69e469909196c099f4ce27377d060f9e3477bb1d8f88153f0a6c165d196685d9&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768710099841-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768713206145-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=19d086e3e27b80cc46c923609023b1a33abfb918f0ad183f6b17ed22492fb156&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768713206145-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769571978680-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=9005cd6838f68312ec8d61a3e9ca8b16f3a9b14690ddea41817ba10fbdb2f336&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1769571978680-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1766636589779-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=3d74dae63047d2bd14153fda1e2fb5dd2119d291370b8280cb2315f170190642&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1766636589779-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768713886512-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=2f495abab35028f8c0252bd5d55429336e0ea25d0e8113c3db42ce02bb97ee1a&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768713886512-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768640645444-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=66b7a7a63f7b1d3e885d224324516f63084c882a9874fa40a9d3f7944faed7ec&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768640645444-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769399617573-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=9c0a94169286e37d91f38b4014dbcf8f07b46839574258831b667b97cb79b84c&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1769399617573-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1773129061191-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=572dbb7dd60e469d2758846d2c34d493c0d3aca7a56dbf6651f176239ede2f14&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1773129061191-0","expiresAt":1773586616689},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1773130741608-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=9599f39beec30a6c696ee701f456a6d5217f05fe0d240b4d2d807aeb3c485269&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1773130741608-0","expiresAt":1773586616690},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1773209103816-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=9032c0c1157de7c4d300eadf0ba6dfddf477b2ecad88185f90cb5c18f046d1c9&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1773209103816-0","expiresAt":1773586616690},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1773222507937-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=77bfd51201ace4f2f8da1480deeff6a71557e04a8b4963cc57bd040b0208245f&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1773222507937-0","expiresAt":1773586616690},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1773126524403-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=1b0c1abeee41df128fce14f1a8986cfcf079ce654d07faf9424608c96e299aec&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1773126524403-0","expiresAt":1773586616690},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1773208909509-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=b2116a692bbd848df535c7085c8af39f8e13567ecb3fc2439cf94def45119201&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1773208909509-0","expiresAt":1773586616690},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1773128056033-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=30bf71994e81c9614a1cd625ffbe0032b1863de7d7d0afcd38d553a6a982f428&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1773128056033-0","expiresAt":1773586616690},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1773224238549-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=4f0508b36d153a02857b2a0be0f0152329ea2833c57069589ac35bf14df6f760&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1773224238549-0","expiresAt":1773586616690},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1773207859878-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=856678ba8e9943aa3fae9bff9cc43d2a1c75c134232b56691affdca69a7fd684&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1773207859878-0","expiresAt":1773586616690},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1773128303272-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=ddae8d025e8ace66cde1f957162fe9f845c172972c2c285760bb51d30099f411&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1773128303272-0","expiresAt":1773586616690},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1773208255512-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=12c467b1e96b240e959e7dc4bbe02fa37ead9d968f2e180b48a1d962eb617d83&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1773208255512-0","expiresAt":1773586616690},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769063660493-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=fd0553b1e07f5bc6d37502a17a760c41b04ec90279686eb1cfb89f28e4034967&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1769063660493-0","expiresAt":1773586616690},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1773129209100-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=dd2d5b61b51c09e396b41354c6db0369c0d0eb8750d97d8d7be180963f494c66&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1773129209100-0","expiresAt":1773586616690},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1773129907627-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=fc19d750bc7f244400ff9ba2e80c687dc66de50432faa56457f0fa7ef76fa4df&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1773129907627-0","expiresAt":1773586616690},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769571810861-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=c4e1ec262f86a81e706b49c8648432b76b69b18e02bb2b12890d0c678d4e7ed5&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1769571810861-0","expiresAt":1773586616690},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769396724595-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=63ab7dda9c47f0d7cdd914e72e94c0e433e2cfd2119a8d8b8bd3dc84c178406b&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1769396724595-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768642455479-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=69fea7dd8249565653e612bef342d6906a274f212bd86c6a69cf477792f19029&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768642455479-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769241234003-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=0f1f6918dde69086f142fc9e1876920a3d2cc69a248273a6adc8e6dd7f91d9e1&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1769241234003-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1773126251435-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=34232ec21a98b2a58dfb51613a247bcda35417b204e7761c84cfdde837dd63b6&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1773126251435-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768653997561-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=40649e785278d1ea20ba4986ec91dff064e8e34a190976e88e0baed326de6794&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768653997561-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769398710713-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=0b76722c5179ed6d8bf3dd4465cff4b898ef128ea2324d878162e265bac097cc&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1769398710713-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768642724520-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=ad18da2bf92a90dd4c7da6a4d1566de3459cad8bc4144475a76260e5d626ba1f&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768642724520-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768646932088-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=4b6f97eba79c38f1c74c86220302df3eea21d7ecdd1b2b1e8a9d848bb027847a&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768646932088-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769398103853-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=b5b6e3c905a816bc9f8ab51765621036d7eae249bb4d87cdf12b33f23b87b485&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1769398103853-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1770212631435-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=a8aa57eb9509807bd7fc4431daf8acd0ab8645f63012fd66576941a3fb266dcd&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1770212631435-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768639090932-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=f0679a2332d7fde3ac5956c451fd24d49417b947b0d8319bbed1ed7458f6ca7e&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768639090932-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768647119198-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=463860fd2fbe2e6f17cff4c2d9c8593747e56c148cf72284f2e31f5afaa111ce&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768647119198-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769574792720-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=6766ac8eeb77a0c023a741a57462b8055b66e8c9af551d6e39d3adba1b9de157&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1769574792720-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1764500702143-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=9f252805d6a97d77b17dc76f7fef924505fa21f66bd64a15bf27c917c27014dc&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1764500702143-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1764500702144-1?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=160ef1148727f77b6e7d10749dcea523d253a21308e410b19100ddb7d0304cf3&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1764500702144-1","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1766406273176-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=63d5c2745c58b5386eda4bbe1bbd5845e2f4214da9790f92d2d5c148197689eb&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1766406273176-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1766406273178-1?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=0b835752d5bd15c1aa71e04cd3f4854c8675a73a420961934ff9650be20c2d30&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1766406273178-1","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769395184980-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=1b142cb32ac06c0e95a077db5e84d3ae54a580057c120dd02bbfb9d607162087&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1769395184980-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768650081183-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=e7a5e66ae1abb7cf0c9edf0494a6a800380e87275405299188b3dd214cd86e76&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768650081183-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768817786453-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=d37033864eb4fd9e666af38a8efe6fbc6edc15bce19bef0e0f232becb9c0e901&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768817786453-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768817786455-1?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=df807462edcf412dcc4c04c0455ab9f1361984cbbbdd24f9dda88bd244d80ee8&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768817786455-1","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768650709484-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=6383456d35171692a9c50ca5eabf4fbb71686e69384a8a38029070489d47ac9d&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768650709484-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768651334320-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=b9e3c691a9fd3f7e4486f7346b1999359577385f00d34102fe5648bde5baba8d&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768651334320-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1767636171845-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=e001faacdf02472977ddd254102c336b94842674823f3f551bf877250f236e61&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1767636171845-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769356702593-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=bf425c3a3ba525caedfa4b724c2e96b7dff06b11ab4d605033f3a6fd415e02bb&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1769356702593-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769356039418-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=f02e7234c87d1d5f75e3a1072db06602137c94c9cd86b6b452184c5416c2030b&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1769356039418-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768834170995-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=af2058a866a15d5e547f090bcafbfeb845a2fd269ec7561b2faffd818a29d7b0&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768834170995-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769149707440-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=3fb8385c9a22aa3942c4a12e7ec4aee1b57ff8e2298167a41fd913da81325000&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1769149707440-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769151216776-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=de206a3c962feccfbfc14d5faeb70901bb2db91b9fdb95184d36fca0d6240efd&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1769151216776-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1770051810386-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=966f1bd2233600be196a302499a0b4535ea3e477812a936c80cd88e71882d6a8&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1770051810386-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1770051959669-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=ce3bb7df58f809836781e88939b392ebe5cfd805df37f8014ab16b8b0294f60b&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1770051959669-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769353802270-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=8fe82b0c230308d8855b5d450bdb5e020327a6b03f914b67a6b8787194098946&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1769353802270-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1767636561867-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=eb900be2361dba1d435431cd8243ce7dc5c2e3078fec7586d50a17e73f7a9403&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1767636561867-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769150471654-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=d1f4d63fc1913144953c63bcf63391ef460090328d6ceef9b01b89e7fb037ba0&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1769150471654-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769150471655-1?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=7b26a2e0579e4f5c630b790ebf80148354554acd08f49ea489e3cbf69911153b&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1769150471655-1","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769151844424-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=37a30fb90bb4214877d882d271993a860f5705761362acc41690a890a4e598c1&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1769151844424-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768641635898-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=49dd19f4d3e0a52f47f94f4c16fc16a878e77b603b538eac1cbdf3a8a600c86d&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768641635898-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769351976737-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=037725e4f9ad399f80739dbdc2c65d5e461ab7518fec917ec4c9f2270f353c20&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1769351976737-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768652061701-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=7fe678b6d580f53ebe3f570f75c0a67da1bd3a57c0f983c5b4f0afd963897465&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768652061701-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768643138910-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=e7d05dce6b57df25be8a9522d95665daf19822cfc55fcf80b8fe8e525924089d&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768643138910-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768651774899-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=b61537df9ac3ee7a57d5344363b4f3a72b3bb32b43d09288f2d3afd612481bfa&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768651774899-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769576743718-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=243c780a7f95f9fa7e28b9e6014057903251f675b430b788c823e69ee5722566&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1769576743718-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768658094891-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=d027dd5368b1e8d54e4f845bf26bde28eedb9b40530a1b4b0af065798b9b52e6&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768658094891-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768639705530-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=81c0ca304e5a51718706435841e9f19479e506b2a98cd2842be4c255ab23c071&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768639705530-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768639707515-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=24c59fbd5835d4e4e3f2294d2b040d085b38b742de79a8bb51eda20b305f9f28&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768639707515-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769577010969-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=dc8469490a91261ad535da3940b4236e8553ada9b094d06c1b2b52d3a1c0467d&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1769577010969-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769394457296-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=94e8d62b01f0e27d7e58bab0e07b974255a586cc429d0c1598ea4a01e46016f9&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1769394457296-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768822893380-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=f19d1a02aa4ebdbf270753570563c96186ddceb93f56d47076482c03b0bca8a1&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768822893380-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768654475850-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=48aca04ef98dddd70250a8577dbbcda0a268a0e8163d71af1eebdf2500d81a8f&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768654475850-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769571126092-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=f4a4fcc16a6e84b4a597595c093b553dd7da7a0c4d0a27af492bf431a7468491&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1769571126092-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1771647812442-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=a1aa6676e0b6c55291aec43363acefbda9efec4a43f968487233e98d35aaf473&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1771647812442-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769149204037-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=38a9f77881af3c37523a7b8ef5f5a305c1aa01b43daf2a8eeb999b85446e671f&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1769149204037-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768640403001-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=44290f5774a34c61c73c4a8edb6ba231e5af081a1b0479ea1abb59c8a08c8c80&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768640403001-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768646295695-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=702c11b88b873bcb782f351a4830a6d517188069095e4b937d6b8e6199607cb3&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768646295695-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769396046557-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=589aefb2c8be677e765d3d9a7ef23980330cfa303eb4c02048a045a1c35460a7&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1769396046557-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768713537512-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=ac7cb348311d0527ff9d17ee0ea78df78c8ec8c0c2aab8c4fc620bb37452b029&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768713537512-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768638795991-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=b08bddf8169794c05fbfb4c69f2d7a6bd2cbf10a3f5c8c7042c647a7fd82c114&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768638795991-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768646744949-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=8f4b95031d2ef6ad010a59e35415b25e5ae92dbd38b2a14a613eed1be4ed086a&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768646744949-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768711919135-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=63d846726af60f7ae8b9b6dce8d6c112339ff0d5b4f850afb3ab03a7fa83a827&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768711919135-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1769063467386-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=229e7b216d5f479daaaace3e2f4c0663c3b446618e6cf885cb02ccebb4dd9f82&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1769063467386-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768639292540-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=079ae798658ae7cda9b4c17fe078906f4fad296194b93ca7511e27e95960433c&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768639292540-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768640233068-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=2c447a84a8f46b6ebc75995b18ffe12ad936a307fe5b46797c9c0aa124620c37&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768640233068-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768834996932-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=b38e8e15f47e4f8ca914159d7135721661ebd73b9390a5dd37b1c287c762a8b2&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768834996932-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768653009851-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=573fab8024104315d909d806c11e6684c2072a6eba736b84e8ec542fb9bf8c23&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768653009851-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768649838027-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=664e4c8348b31544ec78324ca5374a2da9091f08492b6fc9f0c6db8f19633f0b&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768649838027-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768712490280-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=a8df1c63e841d1a42fa0bdc93997777d0061a8cdc6e9309674e3c05f23cf7677&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768712490280-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768539930897-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=7b605406f22c1db6e6243ad7ff9714569780c3a4aedbf5202f83be93ba5788e1&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768539930897-0","expiresAt":1773586616691},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer/product-images/1768539930899-1?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260312%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260312T145756Z&X-Amz-Expires=259200&X-Amz-Signature=10d579c2a9db644fab2efffca06a35ea64c1ff354180d9914dc44f6792e3c7be&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1768539930899-1","expiresAt":1773586616691}}} \ No newline at end of file +{"originalToSigned":{"tags/1763835253683-c9c3e293-0bef-4c58-a976-dd49c050cd36.jpeg":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/tags/1763835253683-c9c3e293-0bef-4c58-a976-dd49c050cd36.jpeg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T062825Z&X-Amz-Expires=259200&X-Amz-Signature=e791b334e8c24bc20a1d06bf6a9a4ed5b314ee65bfdc772e07492effc64da0c0&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1774765645509},"tags/1763835293899-43b3fbe1-9b5b-441c-b4d4-d1691c3f02f3.webp":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/tags/1763835293899-43b3fbe1-9b5b-441c-b4d4-d1691c3f02f3.webp?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T062825Z&X-Amz-Expires=259200&X-Amz-Signature=3a923d1bf9440f4878eaeb78d790fda17b1e989f3f1622defc8563b527cbe474&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1774765645698},"tags/1768709725124-ebf421c5-ad52-49a9-b65c-1de008110b8a.png":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/tags/1768709725124-ebf421c5-ad52-49a9-b65c-1de008110b8a.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T062825Z&X-Amz-Expires=259200&X-Amz-Signature=9c24c1079fbb4f5039b4255680b228322f5e4a86a5ad3d0f8828a0447788da88&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1774765645886},"tags/1770321659633-1763869265110-e22b6d94-dac9-499f-babb-1e944d90b01a.jpeg%3FX-Amz-Algorithm%3DAWS4-HMAC-SHA256%26X-Amz-Content-Sha256%3DUNSIGNED-PAYLOAD%26X-Amz-Credential%3D8fab47503efb9547b50e4fb317e35cc7%252F20260205%252Fapac%252Fs3%252Faws4_request%26X-Amz-Date%3D20260205T195535Z%26X-Amz-Expires%3D259200%26X-Amz-Signature%3D917db15bcc60cab7ac5cd5e49d85d13a960fe77b4a5e327dd449048870494cf9%26X-Amz-SignedHeaders%3Dhost%26x-amz-checksum-mode%3DENABLED%26x-id%3DGetObject":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/tags/1770321659633-1763869265110-e22b6d94-dac9-499f-babb-1e944d90b01a.jpeg%253FX-Amz-Algorithm%253DAWS4-HMAC-SHA256%2526X-Amz-Content-Sha256%253DUNSIGNED-PAYLOAD%2526X-Amz-Credential%253D8fab47503efb9547b50e4fb317e35cc7%25252F20260205%25252Fapac%25252Fs3%25252Faws4_request%2526X-Amz-Date%253D20260205T195535Z%2526X-Amz-Expires%253D259200%2526X-Amz-Signature%253D917db15bcc60cab7ac5cd5e49d85d13a960fe77b4a5e327dd449048870494cf9%2526X-Amz-SignedHeaders%253Dhost%2526x-amz-checksum-mode%253DENABLED%2526x-id%253DGetObject?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T062826Z&X-Amz-Expires=259200&X-Amz-Signature=ced71cc072ae4b7a10671a147815569568a62ee28f1eb38a1fd556ab385e1a3d&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1774765646075},"tags/1770323410499-1763869436182-bf82f7b4-a1f3-4113-985b-96311b7a910e.jpeg%3FX-Amz-Algorithm%3DAWS4-HMAC-SHA256%26X-Amz-Content-Sha256%3DUNSIGNED-PAYLOAD%26X-Amz-Credential%3D8fab47503efb9547b50e4fb317e35cc7%252F20260205%252Fapac%252Fs3%252Faws4_request%26X-Amz-Date%3D20260205T202804Z%26X-Amz-Expires%3D259200%26X-Amz-Signature%3Dea436390b277935d843cae6b5cfa62aeed5799cb4a962ab31a0be4b132ca4b30%26X-Amz-SignedHeaders%3Dhost%26x-amz-checksum-mode%3DENABLED%26x-id%3DGetObject":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/tags/1770323410499-1763869436182-bf82f7b4-a1f3-4113-985b-96311b7a910e.jpeg%253FX-Amz-Algorithm%253DAWS4-HMAC-SHA256%2526X-Amz-Content-Sha256%253DUNSIGNED-PAYLOAD%2526X-Amz-Credential%253D8fab47503efb9547b50e4fb317e35cc7%25252F20260205%25252Fapac%25252Fs3%25252Faws4_request%2526X-Amz-Date%253D20260205T202804Z%2526X-Amz-Expires%253D259200%2526X-Amz-Signature%253Dea436390b277935d843cae6b5cfa62aeed5799cb4a962ab31a0be4b132ca4b30%2526X-Amz-SignedHeaders%253Dhost%2526x-amz-checksum-mode%253DENABLED%2526x-id%253DGetObject?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T062826Z&X-Amz-Expires=259200&X-Amz-Signature=bc371ae3faf1cd57989e113fab943c4fba0ada4ea21459ad12c729760e3c40b1&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1774765646265},"tags/1770323560823-fd0ec463-bed0-474e-aa14-dc6480ce36af.jpeg":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/tags/1770323560823-fd0ec463-bed0-474e-aa14-dc6480ce36af.jpeg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T062826Z&X-Amz-Expires=259200&X-Amz-Signature=e540d7465d0ad52e007515931c11af6b8d5efd5b5d7b31eb205c50bb358922a8&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1774765646455},"product-images/1774116266063.jpg":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/product-images/1774116266063.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T062826Z&X-Amz-Expires=259200&X-Amz-Signature=e8d2093a41993368dcb477ff6e70c37e4353b98a7c5bf4d366f9443c42dc2910&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1774765646644},"profile-images/1766160314135-1000000018.jpg":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/profile-images/1766160314135-1000000018.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T063524Z&X-Amz-Expires=259200&X-Amz-Signature=562c05bd90cda091960290ef12f977236719a00c96bc023e2e1f95fd0e6cb5de&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1774766064757},"complaint-images/1774176003038.jpg":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/complaint-images/1774176003038.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T063715Z&X-Amz-Expires=259200&X-Amz-Signature=1ad154fab3f839333a7134ba496ff41f3d3b4b840df773ccb831fdcdb75b81aa&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1774766175081},"complaint-images/1774176003229.jpg":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/complaint-images/1774176003229.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T063715Z&X-Amz-Expires=259200&X-Amz-Signature=b4e45e1c7b8d223794ed2ba1f2c6c080b8bedd4aa71cce92f9a29d5fc64d3d81&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1774766175081},"complaint-images/1774176003414.jpg":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/complaint-images/1774176003414.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T063715Z&X-Amz-Expires=259200&X-Amz-Signature=8fcc2f9c9624af4d8c9516633c4db08dbffc40f8199ccebc8f141bdaeba28b31&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1774766175081},"complaint-images/1774175933889.jpg":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/complaint-images/1774175933889.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T063715Z&X-Amz-Expires=259200&X-Amz-Signature=5034054b40e1fa153877275d9f7110bfc5c4070f46dfb89a261faccf2273fb20&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1774766175081},"complaint-images/1774175760765.jpg":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/complaint-images/1774175760765.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T063715Z&X-Amz-Expires=259200&X-Amz-Signature=b3c51270c133c844176f6923316f22d4ac0056eefa86bd0126e5a2da758ced2d&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1774766175081},"complaint-images/1774175270043.jpg":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/complaint-images/1774175270043.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T063715Z&X-Amz-Expires=259200&X-Amz-Signature=24583e42d871230f24227825bb7413b8b40e2e66cb79779e73a72e4371eb5195&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1774766175081},"complaint-images/1774174538370.jpg":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/complaint-images/1774174538370.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T063715Z&X-Amz-Expires=259200&X-Amz-Signature=7a2f0a34725098de2f383607064a459b4340792ec1edb8c742bead430a6639b5&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1774766175081},"complaint-images/1769616732515-0":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/complaint-images/1769616732515-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T063715Z&X-Amz-Expires=259200&X-Amz-Signature=0e3fdabd2df9ea2d53ccdb4813725062a290322d9b94eabd36bb82bffb05f0b0&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1774766175081},"complaint-images/1769616732516-1":{"value":"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/complaint-images/1769616732516-1?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T063715Z&X-Amz-Expires=259200&X-Amz-Signature=d6441c6c322b5421fe9067e118fd8a6123fa0857281cdcbdf8c6160b544bf400&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject","expiresAt":1774766175081}},"signedToOriginal":{"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/tags/1763835253683-c9c3e293-0bef-4c58-a976-dd49c050cd36.jpeg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T062825Z&X-Amz-Expires=259200&X-Amz-Signature=e791b334e8c24bc20a1d06bf6a9a4ed5b314ee65bfdc772e07492effc64da0c0&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"tags/1763835253683-c9c3e293-0bef-4c58-a976-dd49c050cd36.jpeg","expiresAt":1774765645509},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/tags/1763835293899-43b3fbe1-9b5b-441c-b4d4-d1691c3f02f3.webp?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T062825Z&X-Amz-Expires=259200&X-Amz-Signature=3a923d1bf9440f4878eaeb78d790fda17b1e989f3f1622defc8563b527cbe474&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"tags/1763835293899-43b3fbe1-9b5b-441c-b4d4-d1691c3f02f3.webp","expiresAt":1774765645698},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/tags/1768709725124-ebf421c5-ad52-49a9-b65c-1de008110b8a.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T062825Z&X-Amz-Expires=259200&X-Amz-Signature=9c24c1079fbb4f5039b4255680b228322f5e4a86a5ad3d0f8828a0447788da88&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"tags/1768709725124-ebf421c5-ad52-49a9-b65c-1de008110b8a.png","expiresAt":1774765645886},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/tags/1770321659633-1763869265110-e22b6d94-dac9-499f-babb-1e944d90b01a.jpeg%253FX-Amz-Algorithm%253DAWS4-HMAC-SHA256%2526X-Amz-Content-Sha256%253DUNSIGNED-PAYLOAD%2526X-Amz-Credential%253D8fab47503efb9547b50e4fb317e35cc7%25252F20260205%25252Fapac%25252Fs3%25252Faws4_request%2526X-Amz-Date%253D20260205T195535Z%2526X-Amz-Expires%253D259200%2526X-Amz-Signature%253D917db15bcc60cab7ac5cd5e49d85d13a960fe77b4a5e327dd449048870494cf9%2526X-Amz-SignedHeaders%253Dhost%2526x-amz-checksum-mode%253DENABLED%2526x-id%253DGetObject?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T062826Z&X-Amz-Expires=259200&X-Amz-Signature=ced71cc072ae4b7a10671a147815569568a62ee28f1eb38a1fd556ab385e1a3d&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"tags/1770321659633-1763869265110-e22b6d94-dac9-499f-babb-1e944d90b01a.jpeg%3FX-Amz-Algorithm%3DAWS4-HMAC-SHA256%26X-Amz-Content-Sha256%3DUNSIGNED-PAYLOAD%26X-Amz-Credential%3D8fab47503efb9547b50e4fb317e35cc7%252F20260205%252Fapac%252Fs3%252Faws4_request%26X-Amz-Date%3D20260205T195535Z%26X-Amz-Expires%3D259200%26X-Amz-Signature%3D917db15bcc60cab7ac5cd5e49d85d13a960fe77b4a5e327dd449048870494cf9%26X-Amz-SignedHeaders%3Dhost%26x-amz-checksum-mode%3DENABLED%26x-id%3DGetObject","expiresAt":1774765646075},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/tags/1770323410499-1763869436182-bf82f7b4-a1f3-4113-985b-96311b7a910e.jpeg%253FX-Amz-Algorithm%253DAWS4-HMAC-SHA256%2526X-Amz-Content-Sha256%253DUNSIGNED-PAYLOAD%2526X-Amz-Credential%253D8fab47503efb9547b50e4fb317e35cc7%25252F20260205%25252Fapac%25252Fs3%25252Faws4_request%2526X-Amz-Date%253D20260205T202804Z%2526X-Amz-Expires%253D259200%2526X-Amz-Signature%253Dea436390b277935d843cae6b5cfa62aeed5799cb4a962ab31a0be4b132ca4b30%2526X-Amz-SignedHeaders%253Dhost%2526x-amz-checksum-mode%253DENABLED%2526x-id%253DGetObject?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T062826Z&X-Amz-Expires=259200&X-Amz-Signature=bc371ae3faf1cd57989e113fab943c4fba0ada4ea21459ad12c729760e3c40b1&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"tags/1770323410499-1763869436182-bf82f7b4-a1f3-4113-985b-96311b7a910e.jpeg%3FX-Amz-Algorithm%3DAWS4-HMAC-SHA256%26X-Amz-Content-Sha256%3DUNSIGNED-PAYLOAD%26X-Amz-Credential%3D8fab47503efb9547b50e4fb317e35cc7%252F20260205%252Fapac%252Fs3%252Faws4_request%26X-Amz-Date%3D20260205T202804Z%26X-Amz-Expires%3D259200%26X-Amz-Signature%3Dea436390b277935d843cae6b5cfa62aeed5799cb4a962ab31a0be4b132ca4b30%26X-Amz-SignedHeaders%3Dhost%26x-amz-checksum-mode%3DENABLED%26x-id%3DGetObject","expiresAt":1774765646265},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/tags/1770323560823-fd0ec463-bed0-474e-aa14-dc6480ce36af.jpeg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T062826Z&X-Amz-Expires=259200&X-Amz-Signature=e540d7465d0ad52e007515931c11af6b8d5efd5b5d7b31eb205c50bb358922a8&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"tags/1770323560823-fd0ec463-bed0-474e-aa14-dc6480ce36af.jpeg","expiresAt":1774765646455},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/product-images/1774116266063.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T062826Z&X-Amz-Expires=259200&X-Amz-Signature=e8d2093a41993368dcb477ff6e70c37e4353b98a7c5bf4d366f9443c42dc2910&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"product-images/1774116266063.jpg","expiresAt":1774765646644},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/profile-images/1766160314135-1000000018.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T063524Z&X-Amz-Expires=259200&X-Amz-Signature=562c05bd90cda091960290ef12f977236719a00c96bc023e2e1f95fd0e6cb5de&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"profile-images/1766160314135-1000000018.jpg","expiresAt":1774766064757},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/complaint-images/1774176003038.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T063715Z&X-Amz-Expires=259200&X-Amz-Signature=1ad154fab3f839333a7134ba496ff41f3d3b4b840df773ccb831fdcdb75b81aa&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"complaint-images/1774176003038.jpg","expiresAt":1774766175081},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/complaint-images/1774176003229.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T063715Z&X-Amz-Expires=259200&X-Amz-Signature=b4e45e1c7b8d223794ed2ba1f2c6c080b8bedd4aa71cce92f9a29d5fc64d3d81&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"complaint-images/1774176003229.jpg","expiresAt":1774766175081},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/complaint-images/1774176003414.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T063715Z&X-Amz-Expires=259200&X-Amz-Signature=8fcc2f9c9624af4d8c9516633c4db08dbffc40f8199ccebc8f141bdaeba28b31&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"complaint-images/1774176003414.jpg","expiresAt":1774766175081},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/complaint-images/1774175933889.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T063715Z&X-Amz-Expires=259200&X-Amz-Signature=5034054b40e1fa153877275d9f7110bfc5c4070f46dfb89a261faccf2273fb20&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"complaint-images/1774175933889.jpg","expiresAt":1774766175081},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/complaint-images/1774175760765.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T063715Z&X-Amz-Expires=259200&X-Amz-Signature=b3c51270c133c844176f6923316f22d4ac0056eefa86bd0126e5a2da758ced2d&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"complaint-images/1774175760765.jpg","expiresAt":1774766175081},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/complaint-images/1774175270043.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T063715Z&X-Amz-Expires=259200&X-Amz-Signature=24583e42d871230f24227825bb7413b8b40e2e66cb79779e73a72e4371eb5195&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"complaint-images/1774175270043.jpg","expiresAt":1774766175081},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/complaint-images/1774174538370.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T063715Z&X-Amz-Expires=259200&X-Amz-Signature=7a2f0a34725098de2f383607064a459b4340792ec1edb8c742bead430a6639b5&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"complaint-images/1774174538370.jpg","expiresAt":1774766175081},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/complaint-images/1769616732515-0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T063715Z&X-Amz-Expires=259200&X-Amz-Signature=0e3fdabd2df9ea2d53ccdb4813725062a290322d9b94eabd36bb82bffb05f0b0&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"complaint-images/1769616732515-0","expiresAt":1774766175081},"https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com/meatfarmer-dev/complaint-images/1769616732516-1?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=8fab47503efb9547b50e4fb317e35cc7%2F20260326%2Fapac%2Fs3%2Faws4_request&X-Amz-Date=20260326T063715Z&X-Amz-Expires=259200&X-Amz-Signature=d6441c6c322b5421fe9067e118fd8a6123fa0857281cdcbdf8c6160b544bf400&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject":{"value":"complaint-images/1769616732516-1","expiresAt":1774766175081}}} \ No newline at end of file diff --git a/apps/backend/drizzle.config.ts b/apps/backend/drizzle.config.ts deleted file mode 100755 index 0b5c1c9..0000000 --- a/apps/backend/drizzle.config.ts +++ /dev/null @@ -1,11 +0,0 @@ -import 'dotenv/config'; -import { defineConfig } from 'drizzle-kit'; - -export default defineConfig({ - out: './drizzle', - schema: './src/db/schema.ts', - dialect: 'postgresql', - dbCredentials: { - url: process.env.DATABASE_URL!, - }, -}); diff --git a/apps/backend/drizzle/0000_colorful_tinkerer.sql b/apps/backend/drizzle/0000_colorful_tinkerer.sql deleted file mode 100644 index 49fc610..0000000 --- a/apps/backend/drizzle/0000_colorful_tinkerer.sql +++ /dev/null @@ -1,124 +0,0 @@ -CREATE TYPE "public"."order_status" AS ENUM('pending', 'delivered', 'cancelled');--> statement-breakpoint -CREATE TABLE "mf"."addresses" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."addresses_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "user_id" integer NOT NULL, - "address" varchar(500) NOT NULL, - "is_default" boolean DEFAULT false NOT NULL -); ---> statement-breakpoint -CREATE TABLE "mf"."cart_items" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."cart_items_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "user_id" integer NOT NULL, - "product_id" integer NOT NULL, - "quantity" numeric(10, 2) NOT NULL, - "added_at" timestamp DEFAULT now() NOT NULL, - CONSTRAINT "unique_user_product" UNIQUE("user_id","product_id") -); ---> statement-breakpoint -CREATE TABLE "mf"."delivery_slot_info" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."delivery_slot_info_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "deliveryTime" timestamp NOT NULL, - "freezeTime" timestamp NOT NULL, - "is_active" boolean DEFAULT true NOT NULL -); ---> statement-breakpoint -CREATE TABLE "mf"."notifications" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."notifications_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "user_id" integer NOT NULL, - "title" varchar(255) NOT NULL, - "body" varchar(512) NOT NULL, - "type" varchar(50), - "is_read" boolean DEFAULT false NOT NULL, - "created_at" timestamp DEFAULT now() NOT NULL -); ---> statement-breakpoint -CREATE TABLE "mf"."order_items" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."order_items_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "order_id" integer NOT NULL, - "product_id" integer NOT NULL, - "quantity" numeric(10, 2) NOT NULL, - "price" numeric(10, 2) NOT NULL, - "amount" numeric(10, 2) NOT NULL -); ---> statement-breakpoint -CREATE TABLE "mf"."orders" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."orders_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "user_id" integer NOT NULL, - "address_id" integer NOT NULL, - "slot_id" integer NOT NULL, - "total_amount" numeric(10, 2) NOT NULL, - "status" "order_status" DEFAULT 'pending' NOT NULL, - "created_at" timestamp DEFAULT now() NOT NULL -); ---> statement-breakpoint -CREATE TABLE "mf"."payments" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."payments_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "order_id" integer NOT NULL, - "status" varchar(50) NOT NULL, - "gateway" varchar(50) NOT NULL, - "gateway_order_id" varchar(255), - "amount" numeric(10, 2) NOT NULL, - "created_at" timestamp DEFAULT now() NOT NULL -); ---> statement-breakpoint -CREATE TABLE "mf"."product_categories" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."product_categories_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "name" varchar(255) NOT NULL, - "description" varchar(500) -); ---> statement-breakpoint -CREATE TABLE "mf"."product_info" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."product_info_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "name" varchar(255) NOT NULL, - "short_description" varchar(500), - "long_description" varchar(1000), - "unit_id" integer NOT NULL, - "price" numeric(10, 2) NOT NULL, - "images" jsonb, - "created_at" timestamp DEFAULT now() NOT NULL -); ---> statement-breakpoint -CREATE TABLE "mf"."product_slots" ( - "product_id" integer NOT NULL, - "slot_id" integer NOT NULL, - CONSTRAINT "product_slot_pk" UNIQUE("product_id","slot_id") -); ---> statement-breakpoint -CREATE TABLE "mf"."special_deals" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."special_deals_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "product_id" integer NOT NULL, - "quantity" numeric(10, 2) NOT NULL, - "price" numeric(10, 2) NOT NULL, - "valid_till" timestamp NOT NULL -); ---> statement-breakpoint -CREATE TABLE "mf"."units" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."units_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "short_notation" varchar(50) NOT NULL, - "full_name" varchar(100) NOT NULL, - CONSTRAINT "unique_short_notation" UNIQUE("short_notation") -); ---> statement-breakpoint -CREATE TABLE "mf"."users" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."users_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "name" varchar(255) NOT NULL, - "email" varchar(255), - "mobile" varchar(255), - "created_at" timestamp DEFAULT now() NOT NULL, - CONSTRAINT "unique_email" UNIQUE("email") -); ---> statement-breakpoint -ALTER TABLE "mf"."addresses" ADD CONSTRAINT "addresses_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "mf"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."cart_items" ADD CONSTRAINT "cart_items_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "mf"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."cart_items" ADD CONSTRAINT "cart_items_product_id_product_info_id_fk" FOREIGN KEY ("product_id") REFERENCES "mf"."product_info"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."notifications" ADD CONSTRAINT "notifications_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "mf"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."order_items" ADD CONSTRAINT "order_items_order_id_orders_id_fk" FOREIGN KEY ("order_id") REFERENCES "mf"."orders"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."order_items" ADD CONSTRAINT "order_items_product_id_product_info_id_fk" FOREIGN KEY ("product_id") REFERENCES "mf"."product_info"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."orders" ADD CONSTRAINT "orders_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "mf"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."orders" ADD CONSTRAINT "orders_address_id_addresses_id_fk" FOREIGN KEY ("address_id") REFERENCES "mf"."addresses"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."orders" ADD CONSTRAINT "orders_slot_id_delivery_slot_info_id_fk" FOREIGN KEY ("slot_id") REFERENCES "mf"."delivery_slot_info"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."payments" ADD CONSTRAINT "payments_order_id_orders_id_fk" FOREIGN KEY ("order_id") REFERENCES "mf"."orders"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."product_info" ADD CONSTRAINT "product_info_unit_id_units_id_fk" FOREIGN KEY ("unit_id") REFERENCES "mf"."units"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."product_slots" ADD CONSTRAINT "product_slots_product_id_product_info_id_fk" FOREIGN KEY ("product_id") REFERENCES "mf"."product_info"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."product_slots" ADD CONSTRAINT "product_slots_slot_id_delivery_slot_info_id_fk" FOREIGN KEY ("slot_id") REFERENCES "mf"."delivery_slot_info"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."special_deals" ADD CONSTRAINT "special_deals_product_id_product_info_id_fk" FOREIGN KEY ("product_id") REFERENCES "mf"."product_info"("id") ON DELETE no action ON UPDATE no action; \ No newline at end of file diff --git a/apps/backend/drizzle/0001_busy_titania.sql b/apps/backend/drizzle/0001_busy_titania.sql deleted file mode 100644 index 6d2f646..0000000 --- a/apps/backend/drizzle/0001_busy_titania.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE "mf"."delivery_slot_info" RENAME COLUMN "deliveryTime" TO "delivery_time";--> statement-breakpoint -ALTER TABLE "mf"."delivery_slot_info" RENAME COLUMN "freezeTime" TO "freeze_time"; \ No newline at end of file diff --git a/apps/backend/drizzle/0002_wandering_lifeguard.sql b/apps/backend/drizzle/0002_wandering_lifeguard.sql deleted file mode 100644 index e5b41f7..0000000 --- a/apps/backend/drizzle/0002_wandering_lifeguard.sql +++ /dev/null @@ -1,9 +0,0 @@ -CREATE TABLE "mf"."user_creds" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."user_creds_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "user_id" integer NOT NULL, - "user_password" varchar(255) NOT NULL, - "created_at" timestamp DEFAULT now() NOT NULL, - CONSTRAINT "unique_user_cred" UNIQUE("user_id") -); ---> statement-breakpoint -ALTER TABLE "mf"."user_creds" ADD CONSTRAINT "user_creds_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "mf"."users"("id") ON DELETE no action ON UPDATE no action; \ No newline at end of file diff --git a/apps/backend/drizzle/0003_tricky_the_twelve.sql b/apps/backend/drizzle/0003_tricky_the_twelve.sql deleted file mode 100644 index 986274b..0000000 --- a/apps/backend/drizzle/0003_tricky_the_twelve.sql +++ /dev/null @@ -1,41 +0,0 @@ -CREATE TABLE "mf"."order_status" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."order_status_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "order_time" timestamp DEFAULT now() NOT NULL, - "user_id" integer NOT NULL, - "order_id" integer NOT NULL, - "is_packaged" boolean DEFAULT false NOT NULL, - "is_delivered" boolean DEFAULT false NOT NULL -); ---> statement-breakpoint -CREATE TABLE "mf"."payment_info" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."payment_info_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "status" varchar(50) NOT NULL, - "gateway" varchar(50) NOT NULL, - "order_id" varchar(500), - "token" varchar(500), - "merchant_order_id" varchar(255) NOT NULL, - "payload" jsonb, - CONSTRAINT "payment_info_merchant_order_id_unique" UNIQUE("merchant_order_id") -); ---> statement-breakpoint -ALTER TABLE "mf"."order_items" ALTER COLUMN "quantity" SET DATA TYPE varchar(50);--> statement-breakpoint -ALTER TABLE "mf"."orders" ALTER COLUMN "slot_id" DROP NOT NULL;--> statement-breakpoint -ALTER TABLE "mf"."addresses" ADD COLUMN "name" varchar(255) NOT NULL;--> statement-breakpoint -ALTER TABLE "mf"."addresses" ADD COLUMN "phone" varchar(15) NOT NULL;--> statement-breakpoint -ALTER TABLE "mf"."addresses" ADD COLUMN "address_line1" varchar(255) NOT NULL;--> statement-breakpoint -ALTER TABLE "mf"."addresses" ADD COLUMN "address_line2" varchar(255);--> statement-breakpoint -ALTER TABLE "mf"."addresses" ADD COLUMN "city" varchar(100) NOT NULL;--> statement-breakpoint -ALTER TABLE "mf"."addresses" ADD COLUMN "state" varchar(100) NOT NULL;--> statement-breakpoint -ALTER TABLE "mf"."addresses" ADD COLUMN "pincode" varchar(10) NOT NULL;--> statement-breakpoint -ALTER TABLE "mf"."addresses" ADD COLUMN "latitude" real;--> statement-breakpoint -ALTER TABLE "mf"."addresses" ADD COLUMN "longitude" real;--> statement-breakpoint -ALTER TABLE "mf"."orders" ADD COLUMN "is_cod" boolean DEFAULT false NOT NULL;--> statement-breakpoint -ALTER TABLE "mf"."orders" ADD COLUMN "is_online_payment" boolean DEFAULT false NOT NULL;--> statement-breakpoint -ALTER TABLE "mf"."orders" ADD COLUMN "payment_info_id" integer;--> statement-breakpoint -ALTER TABLE "mf"."order_status" ADD CONSTRAINT "order_status_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "mf"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."order_status" ADD CONSTRAINT "order_status_order_id_orders_id_fk" FOREIGN KEY ("order_id") REFERENCES "mf"."orders"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."orders" ADD CONSTRAINT "orders_payment_info_id_payment_info_id_fk" FOREIGN KEY ("payment_info_id") REFERENCES "mf"."payment_info"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."addresses" DROP COLUMN "address";--> statement-breakpoint -ALTER TABLE "mf"."order_items" DROP COLUMN "amount";--> statement-breakpoint -ALTER TABLE "mf"."orders" DROP COLUMN "status";--> statement-breakpoint -DROP TYPE "public"."order_status"; \ No newline at end of file diff --git a/apps/backend/drizzle/0004_lively_diamondback.sql b/apps/backend/drizzle/0004_lively_diamondback.sql deleted file mode 100644 index aeaf5c3..0000000 --- a/apps/backend/drizzle/0004_lively_diamondback.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "mf"."order_status" ADD COLUMN "is_cancelled" boolean DEFAULT false NOT NULL; \ No newline at end of file diff --git a/apps/backend/drizzle/0005_tricky_warhawk.sql b/apps/backend/drizzle/0005_tricky_warhawk.sql deleted file mode 100644 index 0ae296b..0000000 --- a/apps/backend/drizzle/0005_tricky_warhawk.sql +++ /dev/null @@ -1,13 +0,0 @@ -CREATE TABLE "mf"."key_val_store" ( - "key" varchar(255) PRIMARY KEY NOT NULL, - "value" jsonb -); ---> statement-breakpoint -ALTER TABLE "mf"."orders" ADD COLUMN "readable_id" integer NOT NULL;--> statement-breakpoint -ALTER TABLE "mf"."payments" ADD COLUMN "token" varchar(500);--> statement-breakpoint -ALTER TABLE "mf"."payments" ADD COLUMN "merchant_order_id" varchar(255) NOT NULL;--> statement-breakpoint -ALTER TABLE "mf"."payments" ADD COLUMN "payload" jsonb;--> statement-breakpoint -ALTER TABLE "mf"."payments" DROP COLUMN "gateway_order_id";--> statement-breakpoint -ALTER TABLE "mf"."payments" DROP COLUMN "amount";--> statement-breakpoint -ALTER TABLE "mf"."payments" DROP COLUMN "created_at";--> statement-breakpoint -ALTER TABLE "mf"."payments" ADD CONSTRAINT "payments_merchant_order_id_unique" UNIQUE("merchant_order_id"); \ No newline at end of file diff --git a/apps/backend/drizzle/0006_outstanding_joystick.sql b/apps/backend/drizzle/0006_outstanding_joystick.sql deleted file mode 100644 index 9c764dc..0000000 --- a/apps/backend/drizzle/0006_outstanding_joystick.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE "mf"."order_status" ADD COLUMN "cancel_reason" varchar(255);--> statement-breakpoint -ALTER TABLE "mf"."order_status" ADD COLUMN "is_refund_done" boolean DEFAULT false NOT NULL; \ No newline at end of file diff --git a/apps/backend/drizzle/0007_yellow_charles_xavier.sql b/apps/backend/drizzle/0007_yellow_charles_xavier.sql deleted file mode 100644 index 4847280..0000000 --- a/apps/backend/drizzle/0007_yellow_charles_xavier.sql +++ /dev/null @@ -1,11 +0,0 @@ -CREATE TABLE "mf"."complaints" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."complaints_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "user_id" integer NOT NULL, - "order_id" integer, - "complaint_body" varchar(1000) NOT NULL, - "is_resolved" boolean DEFAULT false NOT NULL, - "created_at" timestamp DEFAULT now() NOT NULL -); ---> statement-breakpoint -ALTER TABLE "mf"."complaints" ADD CONSTRAINT "complaints_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "mf"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."complaints" ADD CONSTRAINT "complaints_order_id_orders_id_fk" FOREIGN KEY ("order_id") REFERENCES "mf"."orders"("id") ON DELETE no action ON UPDATE no action; \ No newline at end of file diff --git a/apps/backend/drizzle/0008_nasty_mathemanic.sql b/apps/backend/drizzle/0008_nasty_mathemanic.sql deleted file mode 100644 index 5bd2f03..0000000 --- a/apps/backend/drizzle/0008_nasty_mathemanic.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "mf"."product_info" ADD COLUMN "is_out_of_stock" boolean DEFAULT false NOT NULL; \ No newline at end of file diff --git a/apps/backend/drizzle/0009_peaceful_victor_mancha.sql b/apps/backend/drizzle/0009_peaceful_victor_mancha.sql deleted file mode 100644 index c0cb3f4..0000000 --- a/apps/backend/drizzle/0009_peaceful_victor_mancha.sql +++ /dev/null @@ -1,9 +0,0 @@ -CREATE TABLE "mf"."staff_users" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."staff_users_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "name" varchar(255) NOT NULL, - "password" varchar(255) NOT NULL, - "created_at" timestamp DEFAULT now() NOT NULL -); ---> statement-breakpoint -ALTER TABLE "mf"."user_creds" DROP CONSTRAINT "unique_user_cred";--> statement-breakpoint -ALTER TABLE "mf"."addresses" ADD COLUMN "created_at" timestamp DEFAULT now() NOT NULL; \ No newline at end of file diff --git a/apps/backend/drizzle/0010_flimsy_reavers.sql b/apps/backend/drizzle/0010_flimsy_reavers.sql deleted file mode 100644 index dcef34c..0000000 --- a/apps/backend/drizzle/0010_flimsy_reavers.sql +++ /dev/null @@ -1,15 +0,0 @@ -CREATE TABLE "mf"."coupons" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."coupons_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "is_user_based" boolean DEFAULT false NOT NULL, - "discount_percent" numeric(5, 2), - "flat_discount" numeric(10, 2), - "min_order" numeric(10, 2), - "target_user" integer, - "created_by" integer NOT NULL, - "max_value" numeric(10, 2), - "is_invalidated" boolean DEFAULT false NOT NULL, - "created_at" timestamp DEFAULT now() NOT NULL -); ---> statement-breakpoint -ALTER TABLE "mf"."coupons" ADD CONSTRAINT "coupons_target_user_users_id_fk" FOREIGN KEY ("target_user") REFERENCES "mf"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."coupons" ADD CONSTRAINT "coupons_created_by_staff_users_id_fk" FOREIGN KEY ("created_by") REFERENCES "mf"."staff_users"("id") ON DELETE no action ON UPDATE no action; \ No newline at end of file diff --git a/apps/backend/drizzle/0011_watery_lady_mastermind.sql b/apps/backend/drizzle/0011_watery_lady_mastermind.sql deleted file mode 100644 index 49f3b04..0000000 --- a/apps/backend/drizzle/0011_watery_lady_mastermind.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE "mf"."coupons" ADD COLUMN "is_apply_for_all" boolean DEFAULT false NOT NULL;--> statement-breakpoint -ALTER TABLE "mf"."coupons" ADD COLUMN "valid_till" timestamp;--> statement-breakpoint -ALTER TABLE "mf"."coupons" ADD COLUMN "max_limit_for_user" integer; \ No newline at end of file diff --git a/apps/backend/drizzle/0012_flawless_jubilee.sql b/apps/backend/drizzle/0012_flawless_jubilee.sql deleted file mode 100644 index f4fb56d..0000000 --- a/apps/backend/drizzle/0012_flawless_jubilee.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE "mf"."coupons" ADD COLUMN "coupon_code" varchar(50) NOT NULL;--> statement-breakpoint -ALTER TABLE "mf"."coupons" ADD CONSTRAINT "unique_coupon_code" UNIQUE("coupon_code"); \ No newline at end of file diff --git a/apps/backend/drizzle/0013_married_celestials.sql b/apps/backend/drizzle/0013_married_celestials.sql deleted file mode 100644 index 0844f4f..0000000 --- a/apps/backend/drizzle/0013_married_celestials.sql +++ /dev/null @@ -1,9 +0,0 @@ -CREATE TABLE "mf"."coupon_usage" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."coupon_usage_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "user_id" integer NOT NULL, - "coupon_id" integer NOT NULL, - "used_at" timestamp DEFAULT now() NOT NULL -); ---> statement-breakpoint -ALTER TABLE "mf"."coupon_usage" ADD CONSTRAINT "coupon_usage_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "mf"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."coupon_usage" ADD CONSTRAINT "coupon_usage_coupon_id_coupons_id_fk" FOREIGN KEY ("coupon_id") REFERENCES "mf"."coupons"("id") ON DELETE no action ON UPDATE no action; \ No newline at end of file diff --git a/apps/backend/drizzle/0014_blushing_switch.sql b/apps/backend/drizzle/0014_blushing_switch.sql deleted file mode 100644 index 390e55b..0000000 --- a/apps/backend/drizzle/0014_blushing_switch.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "mf"."delivery_slot_info" ADD COLUMN "delivery_sequence" jsonb; \ No newline at end of file diff --git a/apps/backend/drizzle/0015_sloppy_boomerang.sql b/apps/backend/drizzle/0015_sloppy_boomerang.sql deleted file mode 100644 index 5def26e..0000000 --- a/apps/backend/drizzle/0015_sloppy_boomerang.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "mf"."complaints" ADD COLUMN "response" varchar(1000); \ No newline at end of file diff --git a/apps/backend/drizzle/0016_eminent_thunderbolt_ross.sql b/apps/backend/drizzle/0016_eminent_thunderbolt_ross.sql deleted file mode 100644 index 41056da..0000000 --- a/apps/backend/drizzle/0016_eminent_thunderbolt_ross.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE "mf"."coupons" ADD COLUMN "product_id" integer;--> statement-breakpoint -ALTER TABLE "mf"."coupons" ADD CONSTRAINT "coupons_product_id_product_info_id_fk" FOREIGN KEY ("product_id") REFERENCES "mf"."product_info"("id") ON DELETE no action ON UPDATE no action; \ No newline at end of file diff --git a/apps/backend/drizzle/0017_steady_moira_mactaggert.sql b/apps/backend/drizzle/0017_steady_moira_mactaggert.sql deleted file mode 100644 index c4b644c..0000000 --- a/apps/backend/drizzle/0017_steady_moira_mactaggert.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE "mf"."coupons" RENAME COLUMN "product_id" TO "product_ids";--> statement-breakpoint -ALTER TABLE "mf"."coupons" DROP CONSTRAINT "coupons_product_id_product_info_id_fk"; diff --git a/apps/backend/drizzle/0018_simple_tomorrow_man.sql b/apps/backend/drizzle/0018_simple_tomorrow_man.sql deleted file mode 100644 index 47e5e68..0000000 --- a/apps/backend/drizzle/0018_simple_tomorrow_man.sql +++ /dev/null @@ -1,13 +0,0 @@ -CREATE TABLE "mf"."user_details" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."user_details_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "user_id" integer NOT NULL, - "bio" varchar(500), - "date_of_birth" date, - "gender" varchar(20), - "occupation" varchar(100), - "created_at" timestamp DEFAULT now() NOT NULL, - "updated_at" timestamp DEFAULT now() NOT NULL, - CONSTRAINT "user_details_user_id_unique" UNIQUE("user_id") -); ---> statement-breakpoint -ALTER TABLE "mf"."user_details" ADD CONSTRAINT "user_details_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "mf"."users"("id") ON DELETE no action ON UPDATE no action; \ No newline at end of file diff --git a/apps/backend/drizzle/0019_productive_mulholland_black.sql b/apps/backend/drizzle/0019_productive_mulholland_black.sql deleted file mode 100644 index 4b6b5ef..0000000 --- a/apps/backend/drizzle/0019_productive_mulholland_black.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "mf"."user_details" ADD COLUMN "profile_image" varchar(500); \ No newline at end of file diff --git a/apps/backend/drizzle/0020_narrow_charles_xavier.sql b/apps/backend/drizzle/0020_narrow_charles_xavier.sql deleted file mode 100644 index 721e7bb..0000000 --- a/apps/backend/drizzle/0020_narrow_charles_xavier.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "mf"."product_info" ADD COLUMN "market_price" numeric(10, 2); \ No newline at end of file diff --git a/apps/backend/drizzle/0021_little_spot.sql b/apps/backend/drizzle/0021_little_spot.sql deleted file mode 100644 index 7507a93..0000000 --- a/apps/backend/drizzle/0021_little_spot.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE "mf"."orders" ADD COLUMN "cancellation_reviewed" boolean DEFAULT false NOT NULL;--> statement-breakpoint -ALTER TABLE "mf"."orders" ADD COLUMN "admin_notes" text; \ No newline at end of file diff --git a/apps/backend/drizzle/0022_flippant_omega_sentinel.sql b/apps/backend/drizzle/0022_flippant_omega_sentinel.sql deleted file mode 100644 index 054c0fc..0000000 --- a/apps/backend/drizzle/0022_flippant_omega_sentinel.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "mf"."orders" ADD COLUMN "is_refund_done" boolean DEFAULT false NOT NULL; \ No newline at end of file diff --git a/apps/backend/drizzle/0023_sparkling_starjammers.sql b/apps/backend/drizzle/0023_sparkling_starjammers.sql deleted file mode 100644 index bdb19fb..0000000 --- a/apps/backend/drizzle/0023_sparkling_starjammers.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "mf"."orders" ADD COLUMN "user_notes" text; \ No newline at end of file diff --git a/apps/backend/drizzle/0024_typical_the_twelve.sql b/apps/backend/drizzle/0024_typical_the_twelve.sql deleted file mode 100644 index b266835..0000000 --- a/apps/backend/drizzle/0024_typical_the_twelve.sql +++ /dev/null @@ -1,11 +0,0 @@ -CREATE TABLE "mf"."vendor_snippets" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."vendor_snippets_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "snippet_code" varchar(255) NOT NULL, - "slot_id" integer NOT NULL, - "product_ids" integer[] NOT NULL, - "valid_till" timestamp, - "created_at" timestamp DEFAULT now() NOT NULL, - CONSTRAINT "vendor_snippets_snippet_code_unique" UNIQUE("snippet_code") -); ---> statement-breakpoint -ALTER TABLE "mf"."vendor_snippets" ADD CONSTRAINT "vendor_snippets_slot_id_delivery_slot_info_id_fk" FOREIGN KEY ("slot_id") REFERENCES "mf"."delivery_slot_info"("id") ON DELETE no action ON UPDATE no action; \ No newline at end of file diff --git a/apps/backend/drizzle/0025_tricky_plazm.sql b/apps/backend/drizzle/0025_tricky_plazm.sql deleted file mode 100644 index 1d6a3be..0000000 --- a/apps/backend/drizzle/0025_tricky_plazm.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "mf"."order_status" ADD COLUMN "is_payment_processed" boolean DEFAULT false NOT NULL; \ No newline at end of file diff --git a/apps/backend/drizzle/0026_flippant_spiral.sql b/apps/backend/drizzle/0026_flippant_spiral.sql deleted file mode 100644 index 96c1557..0000000 --- a/apps/backend/drizzle/0026_flippant_spiral.sql +++ /dev/null @@ -1,2 +0,0 @@ -CREATE TYPE "public"."payment_status" AS ENUM('pending', 'success', 'cod', 'failed');--> statement-breakpoint -ALTER TABLE "mf"."order_status" RENAME COLUMN "is_payment_processed" TO "payment_status"; \ No newline at end of file diff --git a/apps/backend/drizzle/0027_huge_iron_monger.sql b/apps/backend/drizzle/0027_huge_iron_monger.sql deleted file mode 100644 index 12219b2..0000000 --- a/apps/backend/drizzle/0027_huge_iron_monger.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE "mf"."order_status" ADD COLUMN "payment_state" "payment_status" DEFAULT 'pending' NOT NULL;--> statement-breakpoint -ALTER TABLE "mf"."order_status" DROP COLUMN "payment_status"; \ No newline at end of file diff --git a/apps/backend/drizzle/0028_clever_anthem.sql b/apps/backend/drizzle/0028_clever_anthem.sql deleted file mode 100644 index b9824cf..0000000 --- a/apps/backend/drizzle/0028_clever_anthem.sql +++ /dev/null @@ -1,10 +0,0 @@ -CREATE TABLE "mf"."notif_creds" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."notif_creds_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "token" varchar(500) NOT NULL, - "added_at" timestamp DEFAULT now() NOT NULL, - "user_id" integer NOT NULL, - "last_verified" timestamp, - CONSTRAINT "notif_creds_token_unique" UNIQUE("token") -); ---> statement-breakpoint -ALTER TABLE "mf"."notif_creds" ADD CONSTRAINT "notif_creds_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "mf"."users"("id") ON DELETE no action ON UPDATE no action; \ No newline at end of file diff --git a/apps/backend/drizzle/0029_short_king_cobra.sql b/apps/backend/drizzle/0029_short_king_cobra.sql deleted file mode 100644 index 2c500d8..0000000 --- a/apps/backend/drizzle/0029_short_king_cobra.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "mf"."users" ALTER COLUMN "name" DROP NOT NULL; \ No newline at end of file diff --git a/apps/backend/drizzle/0030_superb_exiles.sql b/apps/backend/drizzle/0030_superb_exiles.sql deleted file mode 100644 index 8403b55..0000000 --- a/apps/backend/drizzle/0030_superb_exiles.sql +++ /dev/null @@ -1,11 +0,0 @@ -CREATE TABLE "mf"."store_info" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."store_info_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "name" varchar(255) NOT NULL, - "description" varchar(500), - "created_at" timestamp DEFAULT now() NOT NULL, - "owner" integer NOT NULL -); ---> statement-breakpoint -ALTER TABLE "mf"."product_info" ADD COLUMN "store_id" integer;--> statement-breakpoint -ALTER TABLE "mf"."store_info" ADD CONSTRAINT "store_info_owner_staff_users_id_fk" FOREIGN KEY ("owner") REFERENCES "mf"."staff_users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."product_info" ADD CONSTRAINT "product_info_store_id_store_info_id_fk" FOREIGN KEY ("store_id") REFERENCES "mf"."store_info"("id") ON DELETE no action ON UPDATE no action; \ No newline at end of file diff --git a/apps/backend/drizzle/0031_clean_the_hunter.sql b/apps/backend/drizzle/0031_clean_the_hunter.sql deleted file mode 100644 index 30a5cd3..0000000 --- a/apps/backend/drizzle/0031_clean_the_hunter.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "mf"."product_info" ALTER COLUMN "store_id" SET NOT NULL; \ No newline at end of file diff --git a/apps/backend/drizzle/0032_tricky_baron_zemo.sql b/apps/backend/drizzle/0032_tricky_baron_zemo.sql deleted file mode 100644 index ea4b980..0000000 --- a/apps/backend/drizzle/0032_tricky_baron_zemo.sql +++ /dev/null @@ -1,22 +0,0 @@ -CREATE TABLE "mf"."order_cancellations" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."order_cancellations_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "order_id" integer NOT NULL, - "user_id" integer NOT NULL, - "reason" varchar(500), - "cancellation_user_notes" text, - "cancellation_admin_notes" text, - "cancellation_reviewed" boolean DEFAULT false NOT NULL, - "refund_amount" numeric(10, 2), - "refund_status" varchar(50) DEFAULT 'none', - "razorpay_refund_id" varchar(255), - "created_at" timestamp DEFAULT now() NOT NULL, - "reviewed_at" timestamp, - "refund_processed_at" timestamp, - CONSTRAINT "order_cancellations_order_id_unique" UNIQUE("order_id") -); ---> statement-breakpoint -ALTER TABLE "mf"."order_cancellations" ADD CONSTRAINT "order_cancellations_order_id_orders_id_fk" FOREIGN KEY ("order_id") REFERENCES "mf"."orders"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."order_cancellations" ADD CONSTRAINT "order_cancellations_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "mf"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."order_status" DROP COLUMN "is_refund_done";--> statement-breakpoint -ALTER TABLE "mf"."orders" DROP COLUMN "cancellation_reviewed";--> statement-breakpoint -ALTER TABLE "mf"."orders" DROP COLUMN "is_refund_done"; \ No newline at end of file diff --git a/apps/backend/drizzle/0033_brainy_skullbuster.sql b/apps/backend/drizzle/0033_brainy_skullbuster.sql deleted file mode 100644 index 1bf156e..0000000 --- a/apps/backend/drizzle/0033_brainy_skullbuster.sql +++ /dev/null @@ -1,20 +0,0 @@ -CREATE TABLE "mf"."product_tag_info" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."product_tag_info_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "tag_name" varchar(100) NOT NULL, - "tag_description" varchar(500), - "image_url" varchar(500), - "is_dashboard_tag" boolean DEFAULT false NOT NULL, - "created_at" timestamp DEFAULT now() NOT NULL, - CONSTRAINT "product_tag_info_tag_name_unique" UNIQUE("tag_name") -); ---> statement-breakpoint -CREATE TABLE "mf"."product_tags" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."product_tags_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "product_id" integer NOT NULL, - "tag_id" integer NOT NULL, - "assigned_at" timestamp DEFAULT now() NOT NULL, - CONSTRAINT "unique_product_tag" UNIQUE("product_id","tag_id") -); ---> statement-breakpoint -ALTER TABLE "mf"."product_tags" ADD CONSTRAINT "product_tags_product_id_product_info_id_fk" FOREIGN KEY ("product_id") REFERENCES "mf"."product_info"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."product_tags" ADD CONSTRAINT "product_tags_tag_id_product_tag_info_id_fk" FOREIGN KEY ("tag_id") REFERENCES "mf"."product_tag_info"("id") ON DELETE no action ON UPDATE no action; \ No newline at end of file diff --git a/apps/backend/drizzle/0034_yummy_riptide.sql b/apps/backend/drizzle/0034_yummy_riptide.sql deleted file mode 100644 index a9a87a8..0000000 --- a/apps/backend/drizzle/0034_yummy_riptide.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE "mf"."coupon_usage" ADD COLUMN "order_id" integer;--> statement-breakpoint -ALTER TABLE "mf"."coupon_usage" ADD CONSTRAINT "coupon_usage_order_id_orders_id_fk" FOREIGN KEY ("order_id") REFERENCES "mf"."orders"("id") ON DELETE no action ON UPDATE no action; \ No newline at end of file diff --git a/apps/backend/drizzle/0035_lyrical_spencer_smythe.sql b/apps/backend/drizzle/0035_lyrical_spencer_smythe.sql deleted file mode 100644 index 4b96344..0000000 --- a/apps/backend/drizzle/0035_lyrical_spencer_smythe.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "mf"."coupons" ADD COLUMN "exclusive_apply" boolean DEFAULT false NOT NULL; \ No newline at end of file diff --git a/apps/backend/drizzle/0036_eager_naoko.sql b/apps/backend/drizzle/0036_eager_naoko.sql deleted file mode 100644 index b3ef0e6..0000000 --- a/apps/backend/drizzle/0036_eager_naoko.sql +++ /dev/null @@ -1,21 +0,0 @@ -CREATE TABLE "mf"."coupon_applicable_products" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."coupon_applicable_products_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "coupon_id" integer NOT NULL, - "product_id" integer NOT NULL, - CONSTRAINT "unique_coupon_product" UNIQUE("coupon_id","product_id") -); ---> statement-breakpoint -CREATE TABLE "mf"."coupon_applicable_users" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."coupon_applicable_users_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "coupon_id" integer NOT NULL, - "user_id" integer NOT NULL, - CONSTRAINT "unique_coupon_user" UNIQUE("coupon_id","user_id") -); ---> statement-breakpoint -ALTER TABLE "mf"."coupon_usage" ADD COLUMN "order_item_id" integer;--> statement-breakpoint -ALTER TABLE "mf"."order_items" ADD COLUMN "discounted_price" numeric(10, 2);--> statement-breakpoint -ALTER TABLE "mf"."coupon_applicable_products" ADD CONSTRAINT "coupon_applicable_products_coupon_id_coupons_id_fk" FOREIGN KEY ("coupon_id") REFERENCES "mf"."coupons"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."coupon_applicable_products" ADD CONSTRAINT "coupon_applicable_products_product_id_product_info_id_fk" FOREIGN KEY ("product_id") REFERENCES "mf"."product_info"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."coupon_applicable_users" ADD CONSTRAINT "coupon_applicable_users_coupon_id_coupons_id_fk" FOREIGN KEY ("coupon_id") REFERENCES "mf"."coupons"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."coupon_applicable_users" ADD CONSTRAINT "coupon_applicable_users_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "mf"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."coupon_usage" ADD CONSTRAINT "coupon_usage_order_item_id_order_items_id_fk" FOREIGN KEY ("order_item_id") REFERENCES "mf"."order_items"("id") ON DELETE no action ON UPDATE no action; \ No newline at end of file diff --git a/apps/backend/drizzle/0037_pale_outlaw_kid.sql b/apps/backend/drizzle/0037_pale_outlaw_kid.sql deleted file mode 100644 index 3e20dca..0000000 --- a/apps/backend/drizzle/0037_pale_outlaw_kid.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "mf"."order_cancellations" RENAME COLUMN "razorpay_refund_id" TO "merchant_refund_id"; \ No newline at end of file diff --git a/apps/backend/drizzle/0038_volatile_jean_grey.sql b/apps/backend/drizzle/0038_volatile_jean_grey.sql deleted file mode 100644 index 7396d1f..0000000 --- a/apps/backend/drizzle/0038_volatile_jean_grey.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE "mf"."product_info" ADD COLUMN "is_suspended" boolean DEFAULT false NOT NULL;--> statement-breakpoint -ALTER TABLE "mf"."user_details" ADD COLUMN "is_suspended" boolean DEFAULT false NOT NULL; \ No newline at end of file diff --git a/apps/backend/drizzle/0039_last_silver_samurai.sql b/apps/backend/drizzle/0039_last_silver_samurai.sql deleted file mode 100644 index 6a9292f..0000000 --- a/apps/backend/drizzle/0039_last_silver_samurai.sql +++ /dev/null @@ -1,15 +0,0 @@ -CREATE TABLE "mf"."refunds" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."refunds_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "order_id" integer NOT NULL, - "refund_amount" numeric(10, 2), - "refund_status" varchar(50) DEFAULT 'none', - "merchant_refund_id" varchar(255), - "refund_processed_at" timestamp, - "created_at" timestamp DEFAULT now() NOT NULL -); ---> statement-breakpoint -ALTER TABLE "mf"."order_status" ADD COLUMN "cancellation_user_notes" text;--> statement-breakpoint -ALTER TABLE "mf"."order_status" ADD COLUMN "cancellation_admin_notes" text;--> statement-breakpoint -ALTER TABLE "mf"."order_status" ADD COLUMN "cancellation_reviewed" boolean DEFAULT false NOT NULL;--> statement-breakpoint -ALTER TABLE "mf"."order_status" ADD COLUMN "cancellation_reviewed_at" timestamp;--> statement-breakpoint -ALTER TABLE "mf"."refunds" ADD CONSTRAINT "refunds_order_id_orders_id_fk" FOREIGN KEY ("order_id") REFERENCES "mf"."orders"("id") ON DELETE no action ON UPDATE no action; \ No newline at end of file diff --git a/apps/backend/drizzle/0040_brief_albert_cleary.sql b/apps/backend/drizzle/0040_brief_albert_cleary.sql deleted file mode 100644 index 3f24ba5..0000000 --- a/apps/backend/drizzle/0040_brief_albert_cleary.sql +++ /dev/null @@ -1 +0,0 @@ -DROP TABLE "mf"."order_cancellations" CASCADE; \ No newline at end of file diff --git a/apps/backend/drizzle/0041_fine_kronos.sql b/apps/backend/drizzle/0041_fine_kronos.sql deleted file mode 100644 index 63e6b9c..0000000 --- a/apps/backend/drizzle/0041_fine_kronos.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE "mf"."order_status" ADD COLUMN "refund_coupon_id" integer;--> statement-breakpoint -ALTER TABLE "mf"."order_status" ADD CONSTRAINT "order_status_refund_coupon_id_coupons_id_fk" FOREIGN KEY ("refund_coupon_id") REFERENCES "mf"."coupons"("id") ON DELETE no action ON UPDATE no action; \ No newline at end of file diff --git a/apps/backend/drizzle/0042_organic_phil_sheldon.sql b/apps/backend/drizzle/0042_organic_phil_sheldon.sql deleted file mode 100644 index 56b94be..0000000 --- a/apps/backend/drizzle/0042_organic_phil_sheldon.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "mf"."complaints" ADD COLUMN "images" jsonb; \ No newline at end of file diff --git a/apps/backend/drizzle/0043_natural_joystick.sql b/apps/backend/drizzle/0043_natural_joystick.sql deleted file mode 100644 index cee8424..0000000 --- a/apps/backend/drizzle/0043_natural_joystick.sql +++ /dev/null @@ -1,23 +0,0 @@ -CREATE TYPE "public"."upload_status" AS ENUM('pending', 'claimed');--> statement-breakpoint -CREATE TABLE "mf"."product_reviews" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."product_reviews_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "user_id" integer NOT NULL, - "product_id" integer NOT NULL, - "review_body" text NOT NULL, - "image_urls" jsonb, - "review_time" timestamp DEFAULT now() NOT NULL, - "ratings" real NOT NULL, - "admin_response" text, - "admin_response_images" jsonb, - CONSTRAINT "rating_check" CHECK ("mf"."product_reviews"."ratings" >= 1 AND "mf"."product_reviews"."ratings" <= 5) -); ---> statement-breakpoint -CREATE TABLE "mf"."upload_url_status" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."upload_url_status_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "created_at" timestamp DEFAULT now() NOT NULL, - "key" varchar(500) NOT NULL, - "status" "upload_status" DEFAULT 'pending' NOT NULL -); ---> statement-breakpoint -ALTER TABLE "mf"."product_reviews" ADD CONSTRAINT "product_reviews_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "mf"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."product_reviews" ADD CONSTRAINT "product_reviews_product_id_product_info_id_fk" FOREIGN KEY ("product_id") REFERENCES "mf"."product_info"("id") ON DELETE no action ON UPDATE no action; \ No newline at end of file diff --git a/apps/backend/drizzle/0044_rapid_meltdown.sql b/apps/backend/drizzle/0044_rapid_meltdown.sql deleted file mode 100644 index d58638e..0000000 --- a/apps/backend/drizzle/0044_rapid_meltdown.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "mf"."store_info" ADD COLUMN "image_url" varchar(500); \ No newline at end of file diff --git a/apps/backend/drizzle/0045_puzzling_leader.sql b/apps/backend/drizzle/0045_puzzling_leader.sql deleted file mode 100644 index 59cf3d2..0000000 --- a/apps/backend/drizzle/0045_puzzling_leader.sql +++ /dev/null @@ -1,16 +0,0 @@ -CREATE TABLE "mf"."address_areas" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."address_areas_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "place_name" varchar(255) NOT NULL, - "zone_id" integer, - "created_at" timestamp DEFAULT now() NOT NULL -); ---> statement-breakpoint -CREATE TABLE "mf"."address_zones" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."address_zones_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "zone_name" varchar(255) NOT NULL, - "added_at" timestamp DEFAULT now() NOT NULL -); ---> statement-breakpoint -ALTER TABLE "mf"."addresses" ADD COLUMN "zone_id" integer;--> statement-breakpoint -ALTER TABLE "mf"."address_areas" ADD CONSTRAINT "address_areas_zone_id_address_zones_id_fk" FOREIGN KEY ("zone_id") REFERENCES "mf"."address_zones"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."addresses" ADD CONSTRAINT "addresses_zone_id_address_zones_id_fk" FOREIGN KEY ("zone_id") REFERENCES "mf"."address_zones"("id") ON DELETE no action ON UPDATE no action; \ No newline at end of file diff --git a/apps/backend/drizzle/0046_old_aaron_stack.sql b/apps/backend/drizzle/0046_old_aaron_stack.sql deleted file mode 100644 index 2341ca8..0000000 --- a/apps/backend/drizzle/0046_old_aaron_stack.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "mf"."orders" ADD COLUMN "delivery_charge" numeric(10, 2) DEFAULT '0' NOT NULL; \ No newline at end of file diff --git a/apps/backend/drizzle/0047_dark_lester.sql b/apps/backend/drizzle/0047_dark_lester.sql deleted file mode 100644 index 58181e0..0000000 --- a/apps/backend/drizzle/0047_dark_lester.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "mf"."product_info" ADD COLUMN "increment_step" real DEFAULT 1 NOT NULL; \ No newline at end of file diff --git a/apps/backend/drizzle/0048_talented_stature.sql b/apps/backend/drizzle/0048_talented_stature.sql deleted file mode 100644 index f0fe03a..0000000 --- a/apps/backend/drizzle/0048_talented_stature.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "mf"."product_info" ALTER COLUMN "store_id" DROP NOT NULL; \ No newline at end of file diff --git a/apps/backend/drizzle/0049_lowly_silverclaw.sql b/apps/backend/drizzle/0049_lowly_silverclaw.sql deleted file mode 100644 index 202127f..0000000 --- a/apps/backend/drizzle/0049_lowly_silverclaw.sql +++ /dev/null @@ -1,16 +0,0 @@ -CREATE TABLE "mf"."product_group_info" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."product_group_info_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "group_name" varchar(255) NOT NULL, - "description" varchar(500), - "created_at" timestamp DEFAULT now() NOT NULL -); ---> statement-breakpoint -CREATE TABLE "mf"."product_group_membership" ( - "product_id" integer NOT NULL, - "group_id" integer NOT NULL, - "added_at" timestamp DEFAULT now() NOT NULL, - CONSTRAINT "product_group_membership_pk" UNIQUE("product_id","group_id") -); ---> statement-breakpoint -ALTER TABLE "mf"."product_group_membership" ADD CONSTRAINT "product_group_membership_product_id_product_info_id_fk" FOREIGN KEY ("product_id") REFERENCES "mf"."product_info"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."product_group_membership" ADD CONSTRAINT "product_group_membership_group_id_product_group_info_id_fk" FOREIGN KEY ("group_id") REFERENCES "mf"."product_group_info"("id") ON DELETE no action ON UPDATE no action; \ No newline at end of file diff --git a/apps/backend/drizzle/0050_fantastic_leopardon.sql b/apps/backend/drizzle/0050_fantastic_leopardon.sql deleted file mode 100644 index 37e1f71..0000000 --- a/apps/backend/drizzle/0050_fantastic_leopardon.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE "mf"."order_items" ADD COLUMN "is_packaged" boolean DEFAULT false NOT NULL;--> statement-breakpoint -ALTER TABLE "mf"."order_items" ADD COLUMN "is_package_verified" boolean DEFAULT false NOT NULL; \ No newline at end of file diff --git a/apps/backend/drizzle/0051_rapid_typhoid_mary.sql b/apps/backend/drizzle/0051_rapid_typhoid_mary.sql deleted file mode 100644 index c63f8c2..0000000 --- a/apps/backend/drizzle/0051_rapid_typhoid_mary.sql +++ /dev/null @@ -1,15 +0,0 @@ -CREATE TABLE "mf"."home_banners" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."home_banners_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "name" varchar(255) NOT NULL, - "image_url" varchar(500) NOT NULL, - "description" varchar(500), - "product_id" integer, - "redirect_url" varchar(500), - "serial_num" integer NOT NULL, - "is_active" boolean DEFAULT false NOT NULL, - "created_at" timestamp DEFAULT now() NOT NULL, - "last_updated" timestamp DEFAULT now() NOT NULL, - CONSTRAINT "home_banners_serial_num_unique" UNIQUE("serial_num") -); ---> statement-breakpoint -ALTER TABLE "mf"."home_banners" ADD CONSTRAINT "home_banners_product_id_product_info_id_fk" FOREIGN KEY ("product_id") REFERENCES "mf"."product_info"("id") ON DELETE no action ON UPDATE no action; \ No newline at end of file diff --git a/apps/backend/drizzle/0052_pretty_captain_britain.sql b/apps/backend/drizzle/0052_pretty_captain_britain.sql deleted file mode 100644 index 9cbaf8b..0000000 --- a/apps/backend/drizzle/0052_pretty_captain_britain.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "mf"."home_banners" ALTER COLUMN "serial_num" DROP NOT NULL; \ No newline at end of file diff --git a/apps/backend/drizzle/0053_volatile_salo.sql b/apps/backend/drizzle/0053_volatile_salo.sql deleted file mode 100644 index 5903c0a..0000000 --- a/apps/backend/drizzle/0053_volatile_salo.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE "mf"."home_banners" RENAME COLUMN "product_id" TO "product_ids";--> statement-breakpoint -ALTER TABLE "mf"."home_banners" DROP CONSTRAINT "home_banners_serial_num_unique";--> statement-breakpoint -ALTER TABLE "mf"."home_banners" DROP CONSTRAINT "home_banners_product_id_product_info_id_fk"; diff --git a/apps/backend/drizzle/0054_red_spyke.sql b/apps/backend/drizzle/0054_red_spyke.sql deleted file mode 100644 index 50916eb..0000000 --- a/apps/backend/drizzle/0054_red_spyke.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "mf"."home_banners" DROP COLUMN "product_ids"; \ No newline at end of file diff --git a/apps/backend/drizzle/0055_petite_fallen_one.sql b/apps/backend/drizzle/0055_petite_fallen_one.sql deleted file mode 100644 index 0d33465..0000000 --- a/apps/backend/drizzle/0055_petite_fallen_one.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "mf"."home_banners" ADD COLUMN "product_ids" integer[]; \ No newline at end of file diff --git a/apps/backend/drizzle/0056_fancy_satana.sql b/apps/backend/drizzle/0056_fancy_satana.sql deleted file mode 100644 index d4a7c46..0000000 --- a/apps/backend/drizzle/0056_fancy_satana.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "mf"."coupons" ADD COLUMN "applicable_users" jsonb; \ No newline at end of file diff --git a/apps/backend/drizzle/0057_safe_earthquake.sql b/apps/backend/drizzle/0057_safe_earthquake.sql deleted file mode 100644 index 2cc2635..0000000 --- a/apps/backend/drizzle/0057_safe_earthquake.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE "mf"."coupons" DROP CONSTRAINT "coupons_target_user_users_id_fk"; ---> statement-breakpoint -ALTER TABLE "mf"."coupons" DROP COLUMN "target_user"; \ No newline at end of file diff --git a/apps/backend/drizzle/0058_motionless_next_avengers.sql b/apps/backend/drizzle/0058_motionless_next_avengers.sql deleted file mode 100644 index 97b49fd..0000000 --- a/apps/backend/drizzle/0058_motionless_next_avengers.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE "mf"."orders" ADD COLUMN "order_group_id" varchar(255);--> statement-breakpoint -ALTER TABLE "mf"."orders" ADD COLUMN "order_group_proportion" numeric(10, 4); \ No newline at end of file diff --git a/apps/backend/drizzle/0059_daily_spot.sql b/apps/backend/drizzle/0059_daily_spot.sql deleted file mode 100644 index a765b60..0000000 --- a/apps/backend/drizzle/0059_daily_spot.sql +++ /dev/null @@ -1,24 +0,0 @@ -CREATE TABLE "mf"."reserved_coupons" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."reserved_coupons_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "secret_code" varchar(50) NOT NULL, - "coupon_code" varchar(50) NOT NULL, - "discount_percent" numeric(5, 2), - "flat_discount" numeric(10, 2), - "min_order" numeric(10, 2), - "product_ids" jsonb, - "max_value" numeric(10, 2), - "valid_till" timestamp, - "max_limit_for_user" integer, - "exclusive_apply" boolean DEFAULT false NOT NULL, - "is_redeemed" boolean DEFAULT false NOT NULL, - "redeemed_by" integer, - "redeemed_at" timestamp, - "created_by" integer NOT NULL, - "created_at" timestamp DEFAULT now() NOT NULL, - CONSTRAINT "reserved_coupons_secret_code_unique" UNIQUE("secret_code"), - CONSTRAINT "unique_secret_code" UNIQUE("secret_code") -); ---> statement-breakpoint -ALTER TABLE "mf"."reserved_coupons" ADD CONSTRAINT "reserved_coupons_redeemed_by_users_id_fk" FOREIGN KEY ("redeemed_by") REFERENCES "mf"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."reserved_coupons" ADD CONSTRAINT "reserved_coupons_created_by_staff_users_id_fk" FOREIGN KEY ("created_by") REFERENCES "mf"."staff_users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."coupons" DROP COLUMN "applicable_users"; \ No newline at end of file diff --git a/apps/backend/drizzle/0060_numerous_terror.sql b/apps/backend/drizzle/0060_numerous_terror.sql deleted file mode 100644 index 9ab3740..0000000 --- a/apps/backend/drizzle/0060_numerous_terror.sql +++ /dev/null @@ -1,28 +0,0 @@ -CREATE TYPE "public"."staff_permission" AS ENUM('crud_product', 'make_coupon');--> statement-breakpoint -CREATE TYPE "public"."staff_role" AS ENUM('admin', 'marketer', 'delivery_staff');--> statement-breakpoint -CREATE TABLE "mf"."staff_permissions" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."staff_permissions_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "permission_name" "staff_permission" NOT NULL, - "created_at" timestamp DEFAULT now() NOT NULL, - CONSTRAINT "unique_permission_name" UNIQUE("permission_name") -); ---> statement-breakpoint -CREATE TABLE "mf"."staff_role_permissions" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."staff_role_permissions_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "staff_role_id" integer NOT NULL, - "staff_permission_id" integer NOT NULL, - "created_at" timestamp DEFAULT now() NOT NULL, - CONSTRAINT "unique_role_permission" UNIQUE("staff_role_id","staff_permission_id") -); ---> statement-breakpoint -CREATE TABLE "mf"."staff_roles" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."staff_roles_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "role_name" "staff_role" NOT NULL, - "created_at" timestamp DEFAULT now() NOT NULL, - CONSTRAINT "unique_role_name" UNIQUE("role_name") -); ---> statement-breakpoint -ALTER TABLE "mf"."staff_users" ADD COLUMN "staff_role_id" integer;--> statement-breakpoint -ALTER TABLE "mf"."staff_role_permissions" ADD CONSTRAINT "staff_role_permissions_staff_role_id_staff_roles_id_fk" FOREIGN KEY ("staff_role_id") REFERENCES "mf"."staff_roles"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."staff_role_permissions" ADD CONSTRAINT "staff_role_permissions_staff_permission_id_staff_permissions_id_fk" FOREIGN KEY ("staff_permission_id") REFERENCES "mf"."staff_permissions"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."staff_users" ADD CONSTRAINT "staff_users_staff_role_id_staff_roles_id_fk" FOREIGN KEY ("staff_role_id") REFERENCES "mf"."staff_roles"("id") ON DELETE no action ON UPDATE no action; \ No newline at end of file diff --git a/apps/backend/drizzle/0061_calm_sir_ram.sql b/apps/backend/drizzle/0061_calm_sir_ram.sql deleted file mode 100644 index a7380ef..0000000 --- a/apps/backend/drizzle/0061_calm_sir_ram.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TYPE "public"."staff_permission" ADD VALUE 'crud_staff_users';--> statement-breakpoint -ALTER TYPE "public"."staff_role" ADD VALUE 'super_admin' BEFORE 'admin'; \ No newline at end of file diff --git a/apps/backend/drizzle/0062_sloppy_sinister_six.sql b/apps/backend/drizzle/0062_sloppy_sinister_six.sql deleted file mode 100644 index 7e24050..0000000 --- a/apps/backend/drizzle/0062_sloppy_sinister_six.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "mf"."coupons" ALTER COLUMN "created_by" DROP NOT NULL; \ No newline at end of file diff --git a/apps/backend/drizzle/0063_friendly_mandarin.sql b/apps/backend/drizzle/0063_friendly_mandarin.sql deleted file mode 100644 index d4945a8..0000000 --- a/apps/backend/drizzle/0063_friendly_mandarin.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE "mf"."delivery_slot_info" ADD COLUMN "is_flash" boolean DEFAULT false NOT NULL;--> statement-breakpoint -ALTER TABLE "mf"."product_info" ADD COLUMN "is_flash_available" boolean DEFAULT false NOT NULL;--> statement-breakpoint -ALTER TABLE "mf"."product_info" ADD COLUMN "flash_price" numeric(10, 2); \ No newline at end of file diff --git a/apps/backend/drizzle/0064_milky_revanche.sql b/apps/backend/drizzle/0064_milky_revanche.sql deleted file mode 100644 index be63270..0000000 --- a/apps/backend/drizzle/0064_milky_revanche.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "mf"."orders" ADD COLUMN "is_flash_delivery" boolean DEFAULT false NOT NULL; \ No newline at end of file diff --git a/apps/backend/drizzle/0065_whole_spencer_smythe.sql b/apps/backend/drizzle/0065_whole_spencer_smythe.sql deleted file mode 100644 index 4cf5c80..0000000 --- a/apps/backend/drizzle/0065_whole_spencer_smythe.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "mf"."product_info" ADD COLUMN "product_quantity" real DEFAULT 1 NOT NULL; \ No newline at end of file diff --git a/apps/backend/drizzle/0066_gorgeous_karnak.sql b/apps/backend/drizzle/0066_gorgeous_karnak.sql deleted file mode 100644 index 801b44f..0000000 --- a/apps/backend/drizzle/0066_gorgeous_karnak.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "mf"."order_status" ADD COLUMN "is_cancelled_by_admin" boolean; \ No newline at end of file diff --git a/apps/backend/drizzle/0067_messy_earthquake.sql b/apps/backend/drizzle/0067_messy_earthquake.sql deleted file mode 100644 index c87f6aa..0000000 --- a/apps/backend/drizzle/0067_messy_earthquake.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE "mf"."vendor_snippets" ALTER COLUMN "slot_id" DROP NOT NULL;--> statement-breakpoint -ALTER TABLE "mf"."vendor_snippets" ADD COLUMN "is_permanent" boolean DEFAULT false NOT NULL; \ No newline at end of file diff --git a/apps/backend/drizzle/0068_colossal_magma.sql b/apps/backend/drizzle/0068_colossal_magma.sql deleted file mode 100644 index 55fdba1..0000000 --- a/apps/backend/drizzle/0068_colossal_magma.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE "mf"."addresses" ADD COLUMN "admin_latitude" real;--> statement-breakpoint -ALTER TABLE "mf"."addresses" ADD COLUMN "admin_longitude" real; \ No newline at end of file diff --git a/apps/backend/drizzle/0069_violet_smiling_tiger.sql b/apps/backend/drizzle/0069_violet_smiling_tiger.sql deleted file mode 100644 index ab0d54b..0000000 --- a/apps/backend/drizzle/0069_violet_smiling_tiger.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "mf"."addresses" ADD COLUMN "google_maps_url" varchar(500); \ No newline at end of file diff --git a/apps/backend/drizzle/0070_known_ares.sql b/apps/backend/drizzle/0070_known_ares.sql deleted file mode 100644 index 77224eb..0000000 --- a/apps/backend/drizzle/0070_known_ares.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "mf"."delivery_slot_info" ADD COLUMN "group_ids" jsonb; \ No newline at end of file diff --git a/apps/backend/drizzle/0071_moaning_shadow_king.sql b/apps/backend/drizzle/0071_moaning_shadow_king.sql deleted file mode 100644 index 842a7b8..0000000 --- a/apps/backend/drizzle/0071_moaning_shadow_king.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "mf"."product_tag_info" ADD COLUMN "related_stores" jsonb; \ No newline at end of file diff --git a/apps/backend/drizzle/0072_flowery_deathbird.sql b/apps/backend/drizzle/0072_flowery_deathbird.sql deleted file mode 100644 index 79f3f4b..0000000 --- a/apps/backend/drizzle/0072_flowery_deathbird.sql +++ /dev/null @@ -1,7 +0,0 @@ -CREATE TABLE "mf"."user_notifications" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."user_notifications_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "image_url" varchar(500), - "created_at" timestamp DEFAULT now() NOT NULL, - "body" text NOT NULL, - "applicable_users" jsonb -); diff --git a/apps/backend/drizzle/0073_faithful_gravity.sql b/apps/backend/drizzle/0073_faithful_gravity.sql deleted file mode 100644 index 45d8247..0000000 --- a/apps/backend/drizzle/0073_faithful_gravity.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "mf"."user_notifications" ADD COLUMN "title" varchar(255) NOT NULL; \ No newline at end of file diff --git a/apps/backend/drizzle/0074_outgoing_black_cat.sql b/apps/backend/drizzle/0074_outgoing_black_cat.sql deleted file mode 100644 index 38a9e8b..0000000 --- a/apps/backend/drizzle/0074_outgoing_black_cat.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "mf"."delivery_slot_info" ADD COLUMN "is_capacity_full" boolean DEFAULT false NOT NULL; \ No newline at end of file diff --git a/apps/backend/drizzle/0075_cuddly_rocket_racer.sql b/apps/backend/drizzle/0075_cuddly_rocket_racer.sql deleted file mode 100644 index 0748e2e..0000000 --- a/apps/backend/drizzle/0075_cuddly_rocket_racer.sql +++ /dev/null @@ -1,7 +0,0 @@ -CREATE TABLE "mf"."unlogged_user_tokens" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."unlogged_user_tokens_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "token" varchar(500) NOT NULL, - "added_at" timestamp DEFAULT now() NOT NULL, - "last_verified" timestamp, - CONSTRAINT "unlogged_user_tokens_token_unique" UNIQUE("token") -); diff --git a/apps/backend/drizzle/0076_sturdy_wolverine.sql b/apps/backend/drizzle/0076_sturdy_wolverine.sql deleted file mode 100644 index 18de64b..0000000 --- a/apps/backend/drizzle/0076_sturdy_wolverine.sql +++ /dev/null @@ -1,13 +0,0 @@ -CREATE TABLE "mf"."user_incidents" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."user_incidents_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "user_id" integer NOT NULL, - "order_id" integer, - "date_added" timestamp DEFAULT now() NOT NULL, - "admin_comment" text, - "added_by" integer, - "negativity_score" integer -); ---> statement-breakpoint -ALTER TABLE "mf"."user_incidents" ADD CONSTRAINT "user_incidents_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "mf"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."user_incidents" ADD CONSTRAINT "user_incidents_order_id_orders_id_fk" FOREIGN KEY ("order_id") REFERENCES "mf"."orders"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "mf"."user_incidents" ADD CONSTRAINT "user_incidents_added_by_staff_users_id_fk" FOREIGN KEY ("added_by") REFERENCES "mf"."staff_users"("id") ON DELETE no action ON UPDATE no action; \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0000_snapshot.json b/apps/backend/drizzle/meta/0000_snapshot.json deleted file mode 100644 index 272396a..0000000 --- a/apps/backend/drizzle/meta/0000_snapshot.json +++ /dev/null @@ -1,976 +0,0 @@ -{ - "id": "fad820d3-856d-4d25-8a79-841c6c0a5eb5", - "prevId": "00000000-0000-0000-0000-000000000000", - "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 - }, - "address": { - "name": "address", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "is_default": { - "name": "is_default", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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.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 - } - }, - "deliveryTime": { - "name": "deliveryTime", - "type": "timestamp", - "primaryKey": false, - "notNull": true - }, - "freezeTime": { - "name": "freezeTime", - "type": "timestamp", - "primaryKey": false, - "notNull": true - }, - "is_active": { - "name": "is_active", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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_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": "numeric(10, 2)", - "primaryKey": false, - "notNull": true - }, - "price": { - "name": "price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true - }, - "amount": { - "name": "amount", - "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.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": true - }, - "total_amount": { - "name": "total_amount", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "order_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "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" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - } - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "gateway": { - "name": "gateway", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "gateway_order_id": { - "name": "gateway_order_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "amount": { - "name": "amount", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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": {}, - "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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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" - } - }, - "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.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.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": true - }, - "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 - } - }, - "enums": { - "public.order_status": { - "name": "order_status", - "schema": "public", - "values": [ - "pending", - "delivered", - "cancelled" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0001_snapshot.json b/apps/backend/drizzle/meta/0001_snapshot.json deleted file mode 100644 index 9daa79e..0000000 --- a/apps/backend/drizzle/meta/0001_snapshot.json +++ /dev/null @@ -1,976 +0,0 @@ -{ - "id": "f702bb39-6b79-4352-979d-537ecbaafd02", - "prevId": "fad820d3-856d-4d25-8a79-841c6c0a5eb5", - "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 - }, - "address": { - "name": "address", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "is_default": { - "name": "is_default", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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.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 - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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_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": "numeric(10, 2)", - "primaryKey": false, - "notNull": true - }, - "price": { - "name": "price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true - }, - "amount": { - "name": "amount", - "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.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": true - }, - "total_amount": { - "name": "total_amount", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "order_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "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" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - } - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "gateway": { - "name": "gateway", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "gateway_order_id": { - "name": "gateway_order_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "amount": { - "name": "amount", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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": {}, - "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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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" - } - }, - "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.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.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": true - }, - "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 - } - }, - "enums": { - "public.order_status": { - "name": "order_status", - "schema": "public", - "values": [ - "pending", - "delivered", - "cancelled" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0002_snapshot.json b/apps/backend/drizzle/meta/0002_snapshot.json deleted file mode 100644 index 0897a31..0000000 --- a/apps/backend/drizzle/meta/0002_snapshot.json +++ /dev/null @@ -1,1048 +0,0 @@ -{ - "id": "c10e79e3-3bd3-46dc-8f6c-3b85f05e6119", - "prevId": "f702bb39-6b79-4352-979d-537ecbaafd02", - "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 - }, - "address": { - "name": "address", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "is_default": { - "name": "is_default", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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.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 - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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_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": "numeric(10, 2)", - "primaryKey": false, - "notNull": true - }, - "price": { - "name": "price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true - }, - "amount": { - "name": "amount", - "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.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": true - }, - "total_amount": { - "name": "total_amount", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "order_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "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" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - } - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "gateway": { - "name": "gateway", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "gateway_order_id": { - "name": "gateway_order_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "amount": { - "name": "amount", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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": {}, - "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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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" - } - }, - "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.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": { - "unique_user_cred": { - "name": "unique_user_cred", - "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": true - }, - "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 - } - }, - "enums": { - "public.order_status": { - "name": "order_status", - "schema": "public", - "values": [ - "pending", - "delivered", - "cancelled" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0003_snapshot.json b/apps/backend/drizzle/meta/0003_snapshot.json deleted file mode 100644 index 11a7c38..0000000 --- a/apps/backend/drizzle/meta/0003_snapshot.json +++ /dev/null @@ -1,1272 +0,0 @@ -{ - "id": "ad09956c-2a68-4891-9a5e-8700ff8872f1", - "prevId": "c10e79e3-3bd3-46dc-8f6c-3b85f05e6119", - "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 - } - }, - "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.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 - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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_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 - } - }, - "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 - }, - "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 - } - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "gateway": { - "name": "gateway", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "gateway_order_id": { - "name": "gateway_order_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "amount": { - "name": "amount", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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": {}, - "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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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" - } - }, - "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.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": { - "unique_user_cred": { - "name": "unique_user_cred", - "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": true - }, - "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 - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0004_snapshot.json b/apps/backend/drizzle/meta/0004_snapshot.json deleted file mode 100644 index 5c130b9..0000000 --- a/apps/backend/drizzle/meta/0004_snapshot.json +++ /dev/null @@ -1,1279 +0,0 @@ -{ - "id": "fe3e10cd-df59-49d1-a87c-56cd0b2f9734", - "prevId": "ad09956c-2a68-4891-9a5e-8700ff8872f1", - "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 - } - }, - "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.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 - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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_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 - } - }, - "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 - }, - "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 - } - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "gateway": { - "name": "gateway", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "gateway_order_id": { - "name": "gateway_order_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "amount": { - "name": "amount", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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": {}, - "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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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" - } - }, - "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.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": { - "unique_user_cred": { - "name": "unique_user_cred", - "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": true - }, - "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 - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0005_snapshot.json b/apps/backend/drizzle/meta/0005_snapshot.json deleted file mode 100644 index 79fd286..0000000 --- a/apps/backend/drizzle/meta/0005_snapshot.json +++ /dev/null @@ -1,1317 +0,0 @@ -{ - "id": "ab751651-7276-48d1-9d5f-abdd1bf05947", - "prevId": "fe3e10cd-df59-49d1-a87c-56cd0b2f9734", - "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 - } - }, - "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.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 - } - }, - "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.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_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 - } - }, - "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 - }, - "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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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" - } - }, - "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.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": { - "unique_user_cred": { - "name": "unique_user_cred", - "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": true - }, - "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 - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0006_snapshot.json b/apps/backend/drizzle/meta/0006_snapshot.json deleted file mode 100644 index 2d7c1d0..0000000 --- a/apps/backend/drizzle/meta/0006_snapshot.json +++ /dev/null @@ -1,1330 +0,0 @@ -{ - "id": "e16dde20-f38b-481d-a3ce-f14a266baef5", - "prevId": "ab751651-7276-48d1-9d5f-abdd1bf05947", - "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 - } - }, - "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.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 - } - }, - "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.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_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 - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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 - }, - "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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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" - } - }, - "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.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": { - "unique_user_cred": { - "name": "unique_user_cred", - "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": true - }, - "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 - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0007_snapshot.json b/apps/backend/drizzle/meta/0007_snapshot.json deleted file mode 100644 index 90b1e24..0000000 --- a/apps/backend/drizzle/meta/0007_snapshot.json +++ /dev/null @@ -1,1421 +0,0 @@ -{ - "id": "8e76cfb1-684c-4eef-849a-96300c6fa492", - "prevId": "e16dde20-f38b-481d-a3ce-f14a266baef5", - "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 - } - }, - "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 - }, - "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.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 - } - }, - "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.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_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 - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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 - }, - "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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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" - } - }, - "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.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": { - "unique_user_cred": { - "name": "unique_user_cred", - "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": true - }, - "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 - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0008_snapshot.json b/apps/backend/drizzle/meta/0008_snapshot.json deleted file mode 100644 index 3dcf5b6..0000000 --- a/apps/backend/drizzle/meta/0008_snapshot.json +++ /dev/null @@ -1,1428 +0,0 @@ -{ - "id": "8391e6b3-8066-456c-9312-c18fa5103a38", - "prevId": "8e76cfb1-684c-4eef-849a-96300c6fa492", - "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 - } - }, - "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 - }, - "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.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 - } - }, - "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.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_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 - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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 - }, - "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 - }, - "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()" - } - }, - "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" - } - }, - "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.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": { - "unique_user_cred": { - "name": "unique_user_cred", - "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": true - }, - "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 - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0009_snapshot.json b/apps/backend/drizzle/meta/0009_snapshot.json deleted file mode 100644 index 4310e8f..0000000 --- a/apps/backend/drizzle/meta/0009_snapshot.json +++ /dev/null @@ -1,1476 +0,0 @@ -{ - "id": "bc817f61-cf55-4711-80fe-c1487d764d4f", - "prevId": "8391e6b3-8066-456c-9312-c18fa5103a38", - "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 - }, - "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.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 - } - }, - "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.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_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 - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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 - }, - "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 - }, - "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()" - } - }, - "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" - } - }, - "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.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.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": true - }, - "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 - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0010_snapshot.json b/apps/backend/drizzle/meta/0010_snapshot.json deleted file mode 100644 index e20c3ba..0000000 --- a/apps/backend/drizzle/meta/0010_snapshot.json +++ /dev/null @@ -1,1592 +0,0 @@ -{ - "id": "85a7d7e5-d586-4a0b-a4a5-3d71cca6768a", - "prevId": "bc817f61-cf55-4711-80fe-c1487d764d4f", - "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 - }, - "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.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 - } - }, - "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 - }, - "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_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": {}, - "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 - } - }, - "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.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_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 - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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 - }, - "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 - }, - "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()" - } - }, - "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" - } - }, - "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.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.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": true - }, - "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 - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0011_snapshot.json b/apps/backend/drizzle/meta/0011_snapshot.json deleted file mode 100644 index 12de0b2..0000000 --- a/apps/backend/drizzle/meta/0011_snapshot.json +++ /dev/null @@ -1,1611 +0,0 @@ -{ - "id": "79d54b35-e076-4351-963e-e2a0b83d77be", - "prevId": "85a7d7e5-d586-4a0b-a4a5-3d71cca6768a", - "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 - }, - "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.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 - } - }, - "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 - }, - "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": {}, - "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 - } - }, - "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.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_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 - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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 - }, - "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 - }, - "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()" - } - }, - "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" - } - }, - "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.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.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": true - }, - "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 - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0012_snapshot.json b/apps/backend/drizzle/meta/0012_snapshot.json deleted file mode 100644 index abce803..0000000 --- a/apps/backend/drizzle/meta/0012_snapshot.json +++ /dev/null @@ -1,1625 +0,0 @@ -{ - "id": "206aba7c-b2d4-4cdc-9019-950ddeb1bcd5", - "prevId": "79d54b35-e076-4351-963e-e2a0b83d77be", - "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 - }, - "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.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 - }, - "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 - } - }, - "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.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_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 - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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 - }, - "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 - }, - "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()" - } - }, - "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" - } - }, - "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.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.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": true - }, - "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 - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0013_snapshot.json b/apps/backend/drizzle/meta/0013_snapshot.json deleted file mode 100644 index bfbe62f..0000000 --- a/apps/backend/drizzle/meta/0013_snapshot.json +++ /dev/null @@ -1,1703 +0,0 @@ -{ - "id": "05c591ea-9654-4079-9d4e-44b78e4115e6", - "prevId": "206aba7c-b2d4-4cdc-9019-950ddeb1bcd5", - "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 - }, - "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 - }, - "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 - } - }, - "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.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_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 - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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 - }, - "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 - }, - "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()" - } - }, - "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" - } - }, - "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.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.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": true - }, - "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 - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0014_snapshot.json b/apps/backend/drizzle/meta/0014_snapshot.json deleted file mode 100644 index 04c1239..0000000 --- a/apps/backend/drizzle/meta/0014_snapshot.json +++ /dev/null @@ -1,1709 +0,0 @@ -{ - "id": "59dd96ee-8bed-44a2-82ec-e4a87b6caae8", - "prevId": "05c591ea-9654-4079-9d4e-44b78e4115e6", - "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 - }, - "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 - }, - "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.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_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 - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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 - }, - "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 - }, - "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()" - } - }, - "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" - } - }, - "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.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.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": true - }, - "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 - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0015_snapshot.json b/apps/backend/drizzle/meta/0015_snapshot.json deleted file mode 100644 index 170c4ee..0000000 --- a/apps/backend/drizzle/meta/0015_snapshot.json +++ /dev/null @@ -1,1715 +0,0 @@ -{ - "id": "1cf1a931-ca28-490e-9c25-532b858ac97c", - "prevId": "59dd96ee-8bed-44a2-82ec-e4a87b6caae8", - "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 - }, - "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.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_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 - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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 - }, - "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 - }, - "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()" - } - }, - "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" - } - }, - "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.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.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": true - }, - "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 - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0016_snapshot.json b/apps/backend/drizzle/meta/0016_snapshot.json deleted file mode 100644 index 6a4e997..0000000 --- a/apps/backend/drizzle/meta/0016_snapshot.json +++ /dev/null @@ -1,1735 +0,0 @@ -{ - "id": "fd9624a0-46e0-402e-b89c-b4cbc612a01a", - "prevId": "1cf1a931-ca28-490e-9c25-532b858ac97c", - "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_id": { - "name": "product_id", - "type": "integer", - "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_product_id_product_info_id_fk": { - "name": "coupons_product_id_product_info_id_fk", - "tableFrom": "coupons", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "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.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_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 - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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 - }, - "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 - }, - "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()" - } - }, - "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" - } - }, - "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.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.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": true - }, - "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 - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0017_snapshot.json b/apps/backend/drizzle/meta/0017_snapshot.json deleted file mode 100644 index b82026d..0000000 --- a/apps/backend/drizzle/meta/0017_snapshot.json +++ /dev/null @@ -1,1721 +0,0 @@ -{ - "id": "439b48c6-32f6-46c1-8320-7276c17a3692", - "prevId": "fd9624a0-46e0-402e-b89c-b4cbc612a01a", - "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.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_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 - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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 - }, - "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 - }, - "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()" - } - }, - "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" - } - }, - "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.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.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": true - }, - "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 - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0018_snapshot.json b/apps/backend/drizzle/meta/0018_snapshot.json deleted file mode 100644 index 9111837..0000000 --- a/apps/backend/drizzle/meta/0018_snapshot.json +++ /dev/null @@ -1,1818 +0,0 @@ -{ - "id": "954545a7-4846-4e3e-8711-3acefdd93417", - "prevId": "439b48c6-32f6-46c1-8320-7276c17a3692", - "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.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_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 - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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 - }, - "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 - }, - "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()" - } - }, - "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" - } - }, - "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.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 - }, - "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": true - }, - "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 - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0019_snapshot.json b/apps/backend/drizzle/meta/0019_snapshot.json deleted file mode 100644 index 59fa671..0000000 --- a/apps/backend/drizzle/meta/0019_snapshot.json +++ /dev/null @@ -1,1824 +0,0 @@ -{ - "id": "2325ff4f-4880-47ec-a396-ce8acdd09850", - "prevId": "954545a7-4846-4e3e-8711-3acefdd93417", - "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.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_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 - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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 - }, - "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 - }, - "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()" - } - }, - "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" - } - }, - "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.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": true - }, - "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 - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0020_snapshot.json b/apps/backend/drizzle/meta/0020_snapshot.json deleted file mode 100644 index c5aea28..0000000 --- a/apps/backend/drizzle/meta/0020_snapshot.json +++ /dev/null @@ -1,1830 +0,0 @@ -{ - "id": "691946b7-158f-4f9e-addb-a8be5cb41597", - "prevId": "2325ff4f-4880-47ec-a396-ce8acdd09850", - "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.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_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 - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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 - }, - "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()" - } - }, - "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" - } - }, - "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.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": true - }, - "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 - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0021_snapshot.json b/apps/backend/drizzle/meta/0021_snapshot.json deleted file mode 100644 index 95a86ec..0000000 --- a/apps/backend/drizzle/meta/0021_snapshot.json +++ /dev/null @@ -1,1843 +0,0 @@ -{ - "id": "d9b7ac5b-af0d-4aac-a352-887cfeed5a2f", - "prevId": "691946b7-158f-4f9e-addb-a8be5cb41597", - "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.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_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 - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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 - }, - "cancellation_reviewed": { - "name": "cancellation_reviewed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "admin_notes": { - "name": "admin_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()" - } - }, - "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" - } - }, - "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.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": true - }, - "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 - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0022_snapshot.json b/apps/backend/drizzle/meta/0022_snapshot.json deleted file mode 100644 index dd9b619..0000000 --- a/apps/backend/drizzle/meta/0022_snapshot.json +++ /dev/null @@ -1,1850 +0,0 @@ -{ - "id": "115942e4-9714-4df3-a48b-23211f65cb6b", - "prevId": "d9b7ac5b-af0d-4aac-a352-887cfeed5a2f", - "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.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_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 - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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 - }, - "cancellation_reviewed": { - "name": "cancellation_reviewed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "admin_notes": { - "name": "admin_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()" - } - }, - "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" - } - }, - "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.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": true - }, - "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 - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0023_snapshot.json b/apps/backend/drizzle/meta/0023_snapshot.json deleted file mode 100644 index f8056fe..0000000 --- a/apps/backend/drizzle/meta/0023_snapshot.json +++ /dev/null @@ -1,1856 +0,0 @@ -{ - "id": "cf922142-eeff-4a81-b99d-a5bd5a2464e5", - "prevId": "115942e4-9714-4df3-a48b-23211f65cb6b", - "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.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_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 - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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 - }, - "cancellation_reviewed": { - "name": "cancellation_reviewed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "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()" - } - }, - "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" - } - }, - "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.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": true - }, - "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 - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0024_snapshot.json b/apps/backend/drizzle/meta/0024_snapshot.json deleted file mode 100644 index 779931f..0000000 --- a/apps/backend/drizzle/meta/0024_snapshot.json +++ /dev/null @@ -1,1940 +0,0 @@ -{ - "id": "f902f415-826a-4332-b64a-b01e05e4c566", - "prevId": "cf922142-eeff-4a81-b99d-a5bd5a2464e5", - "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.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_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 - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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 - }, - "cancellation_reviewed": { - "name": "cancellation_reviewed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "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()" - } - }, - "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" - } - }, - "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.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": true - }, - "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": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0025_snapshot.json b/apps/backend/drizzle/meta/0025_snapshot.json deleted file mode 100644 index 54583d5..0000000 --- a/apps/backend/drizzle/meta/0025_snapshot.json +++ /dev/null @@ -1,1947 +0,0 @@ -{ - "id": "d54aef8a-8ce7-4164-8615-3b819d644700", - "prevId": "f902f415-826a-4332-b64a-b01e05e4c566", - "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.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_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 - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_payment_processed": { - "name": "is_payment_processed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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 - }, - "cancellation_reviewed": { - "name": "cancellation_reviewed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "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()" - } - }, - "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" - } - }, - "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.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": true - }, - "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": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0026_snapshot.json b/apps/backend/drizzle/meta/0026_snapshot.json deleted file mode 100644 index b9b15b9..0000000 --- a/apps/backend/drizzle/meta/0026_snapshot.json +++ /dev/null @@ -1,1959 +0,0 @@ -{ - "id": "4301f24d-4472-44fa-bff8-c12f162531c7", - "prevId": "d54aef8a-8ce7-4164-8615-3b819d644700", - "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.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_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 - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "payment_status": { - "name": "payment_status", - "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 - }, - "cancellation_reviewed": { - "name": "cancellation_reviewed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "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()" - } - }, - "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" - } - }, - "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.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": true - }, - "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": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0027_snapshot.json b/apps/backend/drizzle/meta/0027_snapshot.json deleted file mode 100644 index e543464..0000000 --- a/apps/backend/drizzle/meta/0027_snapshot.json +++ /dev/null @@ -1,1959 +0,0 @@ -{ - "id": "20dc84e5-7223-4852-8239-f9f1f567b535", - "prevId": "4301f24d-4472-44fa-bff8-c12f162531c7", - "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.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_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 - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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 - }, - "cancellation_reviewed": { - "name": "cancellation_reviewed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "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()" - } - }, - "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" - } - }, - "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.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": true - }, - "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": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0028_snapshot.json b/apps/backend/drizzle/meta/0028_snapshot.json deleted file mode 100644 index 9a93c8a..0000000 --- a/apps/backend/drizzle/meta/0028_snapshot.json +++ /dev/null @@ -1,2037 +0,0 @@ -{ - "id": "0c377907-554d-41d9-ad3c-0add9c5edcd7", - "prevId": "20dc84e5-7223-4852-8239-f9f1f567b535", - "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_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 - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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 - }, - "cancellation_reviewed": { - "name": "cancellation_reviewed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "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()" - } - }, - "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" - } - }, - "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.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": true - }, - "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": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0029_snapshot.json b/apps/backend/drizzle/meta/0029_snapshot.json deleted file mode 100644 index 7c51a75..0000000 --- a/apps/backend/drizzle/meta/0029_snapshot.json +++ /dev/null @@ -1,2037 +0,0 @@ -{ - "id": "a2910b44-5bd0-4f5f-ae7e-2b81c0aa8610", - "prevId": "0c377907-554d-41d9-ad3c-0add9c5edcd7", - "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_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 - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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 - }, - "cancellation_reviewed": { - "name": "cancellation_reviewed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "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()" - } - }, - "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" - } - }, - "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.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": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0030_snapshot.json b/apps/backend/drizzle/meta/0030_snapshot.json deleted file mode 100644 index 364b7ef..0000000 --- a/apps/backend/drizzle/meta/0030_snapshot.json +++ /dev/null @@ -1,2127 +0,0 @@ -{ - "id": "1d2b26d7-2a89-446e-93ce-16d068986e09", - "prevId": "a2910b44-5bd0-4f5f-ae7e-2b81c0aa8610", - "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_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 - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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 - }, - "cancellation_reviewed": { - "name": "cancellation_reviewed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "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": false - } - }, - "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": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0031_snapshot.json b/apps/backend/drizzle/meta/0031_snapshot.json deleted file mode 100644 index 2e1c678..0000000 --- a/apps/backend/drizzle/meta/0031_snapshot.json +++ /dev/null @@ -1,2127 +0,0 @@ -{ - "id": "c74c19b3-5a26-4180-84a5-0af70c776ea6", - "prevId": "1d2b26d7-2a89-446e-93ce-16d068986e09", - "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_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 - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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 - }, - "cancellation_reviewed": { - "name": "cancellation_reviewed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_refund_done": { - "name": "is_refund_done", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "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": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0032_snapshot.json b/apps/backend/drizzle/meta/0032_snapshot.json deleted file mode 100644 index 5cda79b..0000000 --- a/apps/backend/drizzle/meta/0032_snapshot.json +++ /dev/null @@ -1,2248 +0,0 @@ -{ - "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": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0033_snapshot.json b/apps/backend/drizzle/meta/0033_snapshot.json deleted file mode 100644 index 7f9730b..0000000 --- a/apps/backend/drizzle/meta/0033_snapshot.json +++ /dev/null @@ -1,2405 +0,0 @@ -{ - "id": "c8c49b84-48e5-47d8-9db3-3346180df341", - "prevId": "efcf7b28-c4d0-4f1a-bcdb-aae980775fd3", - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_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": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0034_snapshot.json b/apps/backend/drizzle/meta/0034_snapshot.json deleted file mode 100644 index 9dc5b50..0000000 --- a/apps/backend/drizzle/meta/0034_snapshot.json +++ /dev/null @@ -1,2425 +0,0 @@ -{ - "id": "a1bc796c-fb93-453e-acc0-95efe2264b2a", - "prevId": "c8c49b84-48e5-47d8-9db3-3346180df341", - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_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": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0035_snapshot.json b/apps/backend/drizzle/meta/0035_snapshot.json deleted file mode 100644 index 1ed4401..0000000 --- a/apps/backend/drizzle/meta/0035_snapshot.json +++ /dev/null @@ -1,2432 +0,0 @@ -{ - "id": "a1aafd4d-ca42-4635-bd1b-1d0c1d6171cd", - "prevId": "a1bc796c-fb93-453e-acc0-95efe2264b2a", - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_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": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0036_snapshot.json b/apps/backend/drizzle/meta/0036_snapshot.json deleted file mode 100644 index 4061f92..0000000 --- a/apps/backend/drizzle/meta/0036_snapshot.json +++ /dev/null @@ -1,2618 +0,0 @@ -{ - "id": "91401115-16a6-41ed-b308-cd7fa2a4301f", - "prevId": "a1aafd4d-ca42-4635-bd1b-1d0c1d6171cd", - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_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": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0037_snapshot.json b/apps/backend/drizzle/meta/0037_snapshot.json deleted file mode 100644 index 330fefe..0000000 --- a/apps/backend/drizzle/meta/0037_snapshot.json +++ /dev/null @@ -1,2618 +0,0 @@ -{ - "id": "4cb82e78-6b8b-434b-8d73-824c457c8590", - "prevId": "91401115-16a6-41ed-b308-cd7fa2a4301f", - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "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'" - }, - "merchant_refund_id": { - "name": "merchant_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_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": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0038_snapshot.json b/apps/backend/drizzle/meta/0038_snapshot.json deleted file mode 100644 index 1552918..0000000 --- a/apps/backend/drizzle/meta/0038_snapshot.json +++ /dev/null @@ -1,2632 +0,0 @@ -{ - "id": "4c5e229e-3a5e-4900-8d76-80a0f560a7fc", - "prevId": "4cb82e78-6b8b-434b-8d73-824c457c8590", - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "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'" - }, - "merchant_refund_id": { - "name": "merchant_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - } - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0039_snapshot.json b/apps/backend/drizzle/meta/0039_snapshot.json deleted file mode 100644 index 2c22a2e..0000000 --- a/apps/backend/drizzle/meta/0039_snapshot.json +++ /dev/null @@ -1,2740 +0,0 @@ -{ - "id": "09444a3a-5b4c-4963-9e47-dabe794c7824", - "prevId": "4c5e229e-3a5e-4900-8d76-80a0f560a7fc", - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "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'" - }, - "merchant_refund_id": { - "name": "merchant_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - } - }, - "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'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0040_snapshot.json b/apps/backend/drizzle/meta/0040_snapshot.json deleted file mode 100644 index 5d1b499..0000000 --- a/apps/backend/drizzle/meta/0040_snapshot.json +++ /dev/null @@ -1,2598 +0,0 @@ -{ - "id": "4e01fc72-d510-4213-bf24-6fa49b0bef22", - "prevId": "09444a3a-5b4c-4963-9e47-dabe794c7824", - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - } - }, - "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'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0041_snapshot.json b/apps/backend/drizzle/meta/0041_snapshot.json deleted file mode 100644 index 2473612..0000000 --- a/apps/backend/drizzle/meta/0041_snapshot.json +++ /dev/null @@ -1,2618 +0,0 @@ -{ - "id": "c86db5c8-3679-4f55-b04e-accd3e06c122", - "prevId": "4e01fc72-d510-4213-bf24-6fa49b0bef22", - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - } - }, - "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'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "is_suspended": { - "name": "is_suspended", - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0042_snapshot.json b/apps/backend/drizzle/meta/0042_snapshot.json deleted file mode 100644 index d507d90..0000000 --- a/apps/backend/drizzle/meta/0042_snapshot.json +++ /dev/null @@ -1,2624 +0,0 @@ -{ - "id": "8f58d3bd-8388-4b61-a005-988a8b738efa", - "prevId": "c86db5c8-3679-4f55-b04e-accd3e06c122", - "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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - } - }, - "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'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "is_suspended": { - "name": "is_suspended", - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0043_snapshot.json b/apps/backend/drizzle/meta/0043_snapshot.json deleted file mode 100644 index 76061d8..0000000 --- a/apps/backend/drizzle/meta/0043_snapshot.json +++ /dev/null @@ -1,2796 +0,0 @@ -{ - "id": "5831be0c-4e34-497c-8cd4-498f6a694cb4", - "prevId": "8f58d3bd-8388-4b61-a005-988a8b738efa", - "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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - } - }, - "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'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "is_suspended": { - "name": "is_suspended", - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0044_snapshot.json b/apps/backend/drizzle/meta/0044_snapshot.json deleted file mode 100644 index d454b81..0000000 --- a/apps/backend/drizzle/meta/0044_snapshot.json +++ /dev/null @@ -1,2802 +0,0 @@ -{ - "id": "e1e88d4a-26a4-41bc-9ceb-7b3f53aec59e", - "prevId": "5831be0c-4e34-497c-8cd4-498f6a694cb4", - "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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - } - }, - "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'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "is_suspended": { - "name": "is_suspended", - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "image_url": { - "name": "image_url", - "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.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0045_snapshot.json b/apps/backend/drizzle/meta/0045_snapshot.json deleted file mode 100644 index 67f6827..0000000 --- a/apps/backend/drizzle/meta/0045_snapshot.json +++ /dev/null @@ -1,2929 +0,0 @@ -{ - "id": "ec3bf6b5-a0c1-458f-bf8c-5abb19a1e0c0", - "prevId": "e1e88d4a-26a4-41bc-9ceb-7b3f53aec59e", - "version": "7", - "dialect": "postgresql", - "tables": { - "mf.address_areas": { - "name": "address_areas", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_areas_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "place_name": { - "name": "place_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "address_areas_zone_id_address_zones_id_fk": { - "name": "address_areas_zone_id_address_zones_id_fk", - "tableFrom": "address_areas", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.address_zones": { - "name": "address_zones", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_zones_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "zone_name": { - "name": "zone_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "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 - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "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" - }, - "addresses_zone_id_address_zones_id_fk": { - "name": "addresses_zone_id_address_zones_id_fk", - "tableFrom": "addresses", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - } - }, - "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'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "is_suspended": { - "name": "is_suspended", - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "image_url": { - "name": "image_url", - "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.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0046_snapshot.json b/apps/backend/drizzle/meta/0046_snapshot.json deleted file mode 100644 index 8fb3db1..0000000 --- a/apps/backend/drizzle/meta/0046_snapshot.json +++ /dev/null @@ -1,2936 +0,0 @@ -{ - "id": "49d740b1-1a3e-4f7a-889f-de0b21ee6cc8", - "prevId": "ec3bf6b5-a0c1-458f-bf8c-5abb19a1e0c0", - "version": "7", - "dialect": "postgresql", - "tables": { - "mf.address_areas": { - "name": "address_areas", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_areas_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "place_name": { - "name": "place_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "address_areas_zone_id_address_zones_id_fk": { - "name": "address_areas_zone_id_address_zones_id_fk", - "tableFrom": "address_areas", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.address_zones": { - "name": "address_zones", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_zones_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "zone_name": { - "name": "zone_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "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 - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "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" - }, - "addresses_zone_id_address_zones_id_fk": { - "name": "addresses_zone_id_address_zones_id_fk", - "tableFrom": "addresses", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - } - }, - "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'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "delivery_charge": { - "name": "delivery_charge", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true, - "default": "'0'" - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "image_url": { - "name": "image_url", - "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.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0047_snapshot.json b/apps/backend/drizzle/meta/0047_snapshot.json deleted file mode 100644 index 071ae13..0000000 --- a/apps/backend/drizzle/meta/0047_snapshot.json +++ /dev/null @@ -1,2943 +0,0 @@ -{ - "id": "6fa28025-ef21-438b-987f-78a0e50142e5", - "prevId": "49d740b1-1a3e-4f7a-889f-de0b21ee6cc8", - "version": "7", - "dialect": "postgresql", - "tables": { - "mf.address_areas": { - "name": "address_areas", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_areas_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "place_name": { - "name": "place_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "address_areas_zone_id_address_zones_id_fk": { - "name": "address_areas_zone_id_address_zones_id_fk", - "tableFrom": "address_areas", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.address_zones": { - "name": "address_zones", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_zones_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "zone_name": { - "name": "zone_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "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 - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "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" - }, - "addresses_zone_id_address_zones_id_fk": { - "name": "addresses_zone_id_address_zones_id_fk", - "tableFrom": "addresses", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - } - }, - "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'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "delivery_charge": { - "name": "delivery_charge", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true, - "default": "'0'" - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "increment_step": { - "name": "increment_step", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "image_url": { - "name": "image_url", - "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.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0048_snapshot.json b/apps/backend/drizzle/meta/0048_snapshot.json deleted file mode 100644 index cdff944..0000000 --- a/apps/backend/drizzle/meta/0048_snapshot.json +++ /dev/null @@ -1,2943 +0,0 @@ -{ - "id": "212a5b02-47e1-4336-8993-5ca2c762d339", - "prevId": "6fa28025-ef21-438b-987f-78a0e50142e5", - "version": "7", - "dialect": "postgresql", - "tables": { - "mf.address_areas": { - "name": "address_areas", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_areas_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "place_name": { - "name": "place_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "address_areas_zone_id_address_zones_id_fk": { - "name": "address_areas_zone_id_address_zones_id_fk", - "tableFrom": "address_areas", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.address_zones": { - "name": "address_zones", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_zones_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "zone_name": { - "name": "zone_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "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 - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "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" - }, - "addresses_zone_id_address_zones_id_fk": { - "name": "addresses_zone_id_address_zones_id_fk", - "tableFrom": "addresses", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - } - }, - "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'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "delivery_charge": { - "name": "delivery_charge", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true, - "default": "'0'" - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "increment_step": { - "name": "increment_step", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "store_id": { - "name": "store_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "image_url": { - "name": "image_url", - "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.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0049_snapshot.json b/apps/backend/drizzle/meta/0049_snapshot.json deleted file mode 100644 index 20199c7..0000000 --- a/apps/backend/drizzle/meta/0049_snapshot.json +++ /dev/null @@ -1,3062 +0,0 @@ -{ - "id": "37e3e95d-e108-4a4c-8589-af8c3b3f8e72", - "prevId": "212a5b02-47e1-4336-8993-5ca2c762d339", - "version": "7", - "dialect": "postgresql", - "tables": { - "mf.address_areas": { - "name": "address_areas", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_areas_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "place_name": { - "name": "place_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "address_areas_zone_id_address_zones_id_fk": { - "name": "address_areas_zone_id_address_zones_id_fk", - "tableFrom": "address_areas", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.address_zones": { - "name": "address_zones", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_zones_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "zone_name": { - "name": "zone_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "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 - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "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" - }, - "addresses_zone_id_address_zones_id_fk": { - "name": "addresses_zone_id_address_zones_id_fk", - "tableFrom": "addresses", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - } - }, - "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'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "delivery_charge": { - "name": "delivery_charge", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true, - "default": "'0'" - }, - "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_group_info": { - "name": "product_group_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_group_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "group_name": { - "name": "group_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()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_group_membership": { - "name": "product_group_membership", - "schema": "mf", - "columns": { - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "group_id": { - "name": "group_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_group_membership_product_id_product_info_id_fk": { - "name": "product_group_membership_product_id_product_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_group_membership_group_id_product_group_info_id_fk": { - "name": "product_group_membership_group_id_product_group_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_group_info", - "schemaTo": "mf", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_group_membership_pk": { - "name": "product_group_membership_pk", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "group_id" - ] - } - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "increment_step": { - "name": "increment_step", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "store_id": { - "name": "store_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "image_url": { - "name": "image_url", - "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.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0050_snapshot.json b/apps/backend/drizzle/meta/0050_snapshot.json deleted file mode 100644 index f2854c0..0000000 --- a/apps/backend/drizzle/meta/0050_snapshot.json +++ /dev/null @@ -1,3076 +0,0 @@ -{ - "id": "8d23ff8c-67de-466f-80a5-1637c4e19ac6", - "prevId": "37e3e95d-e108-4a4c-8589-af8c3b3f8e72", - "version": "7", - "dialect": "postgresql", - "tables": { - "mf.address_areas": { - "name": "address_areas", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_areas_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "place_name": { - "name": "place_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "address_areas_zone_id_address_zones_id_fk": { - "name": "address_areas_zone_id_address_zones_id_fk", - "tableFrom": "address_areas", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.address_zones": { - "name": "address_zones", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_zones_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "zone_name": { - "name": "zone_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "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 - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "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" - }, - "addresses_zone_id_address_zones_id_fk": { - "name": "addresses_zone_id_address_zones_id_fk", - "tableFrom": "addresses", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "is_packaged": { - "name": "is_packaged", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_package_verified": { - "name": "is_package_verified", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "delivery_charge": { - "name": "delivery_charge", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true, - "default": "'0'" - }, - "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_group_info": { - "name": "product_group_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_group_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "group_name": { - "name": "group_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()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_group_membership": { - "name": "product_group_membership", - "schema": "mf", - "columns": { - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "group_id": { - "name": "group_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_group_membership_product_id_product_info_id_fk": { - "name": "product_group_membership_product_id_product_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_group_membership_group_id_product_group_info_id_fk": { - "name": "product_group_membership_group_id_product_group_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_group_info", - "schemaTo": "mf", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_group_membership_pk": { - "name": "product_group_membership_pk", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "group_id" - ] - } - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "increment_step": { - "name": "increment_step", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "store_id": { - "name": "store_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "image_url": { - "name": "image_url", - "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.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0051_snapshot.json b/apps/backend/drizzle/meta/0051_snapshot.json deleted file mode 100644 index e48c75b..0000000 --- a/apps/backend/drizzle/meta/0051_snapshot.json +++ /dev/null @@ -1,3186 +0,0 @@ -{ - "id": "08aad159-d8ec-449a-b2d2-bc9f798f236e", - "prevId": "8d23ff8c-67de-466f-80a5-1637c4e19ac6", - "version": "7", - "dialect": "postgresql", - "tables": { - "mf.address_areas": { - "name": "address_areas", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_areas_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "place_name": { - "name": "place_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "address_areas_zone_id_address_zones_id_fk": { - "name": "address_areas_zone_id_address_zones_id_fk", - "tableFrom": "address_areas", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.address_zones": { - "name": "address_zones", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_zones_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "zone_name": { - "name": "zone_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "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 - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "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" - }, - "addresses_zone_id_address_zones_id_fk": { - "name": "addresses_zone_id_address_zones_id_fk", - "tableFrom": "addresses", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "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.home_banners": { - "name": "home_banners", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "home_banners_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 - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "redirect_url": { - "name": "redirect_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "serial_num": { - "name": "serial_num", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "is_active": { - "name": "is_active", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_updated": { - "name": "last_updated", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "home_banners_product_id_product_info_id_fk": { - "name": "home_banners_product_id_product_info_id_fk", - "tableFrom": "home_banners", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "home_banners_serial_num_unique": { - "name": "home_banners_serial_num_unique", - "nullsNotDistinct": false, - "columns": [ - "serial_num" - ] - } - }, - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "is_packaged": { - "name": "is_packaged", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_package_verified": { - "name": "is_package_verified", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "delivery_charge": { - "name": "delivery_charge", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true, - "default": "'0'" - }, - "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_group_info": { - "name": "product_group_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_group_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "group_name": { - "name": "group_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()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_group_membership": { - "name": "product_group_membership", - "schema": "mf", - "columns": { - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "group_id": { - "name": "group_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_group_membership_product_id_product_info_id_fk": { - "name": "product_group_membership_product_id_product_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_group_membership_group_id_product_group_info_id_fk": { - "name": "product_group_membership_group_id_product_group_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_group_info", - "schemaTo": "mf", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_group_membership_pk": { - "name": "product_group_membership_pk", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "group_id" - ] - } - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "increment_step": { - "name": "increment_step", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "store_id": { - "name": "store_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "image_url": { - "name": "image_url", - "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.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0052_snapshot.json b/apps/backend/drizzle/meta/0052_snapshot.json deleted file mode 100644 index 93cf2a7..0000000 --- a/apps/backend/drizzle/meta/0052_snapshot.json +++ /dev/null @@ -1,3186 +0,0 @@ -{ - "id": "d7557b6f-c95b-4cf5-bc58-b74e319f1ba3", - "prevId": "08aad159-d8ec-449a-b2d2-bc9f798f236e", - "version": "7", - "dialect": "postgresql", - "tables": { - "mf.address_areas": { - "name": "address_areas", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_areas_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "place_name": { - "name": "place_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "address_areas_zone_id_address_zones_id_fk": { - "name": "address_areas_zone_id_address_zones_id_fk", - "tableFrom": "address_areas", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.address_zones": { - "name": "address_zones", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_zones_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "zone_name": { - "name": "zone_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "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 - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "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" - }, - "addresses_zone_id_address_zones_id_fk": { - "name": "addresses_zone_id_address_zones_id_fk", - "tableFrom": "addresses", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "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.home_banners": { - "name": "home_banners", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "home_banners_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 - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "redirect_url": { - "name": "redirect_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "serial_num": { - "name": "serial_num", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "is_active": { - "name": "is_active", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_updated": { - "name": "last_updated", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "home_banners_product_id_product_info_id_fk": { - "name": "home_banners_product_id_product_info_id_fk", - "tableFrom": "home_banners", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "home_banners_serial_num_unique": { - "name": "home_banners_serial_num_unique", - "nullsNotDistinct": false, - "columns": [ - "serial_num" - ] - } - }, - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "is_packaged": { - "name": "is_packaged", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_package_verified": { - "name": "is_package_verified", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "delivery_charge": { - "name": "delivery_charge", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true, - "default": "'0'" - }, - "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_group_info": { - "name": "product_group_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_group_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "group_name": { - "name": "group_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()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_group_membership": { - "name": "product_group_membership", - "schema": "mf", - "columns": { - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "group_id": { - "name": "group_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_group_membership_product_id_product_info_id_fk": { - "name": "product_group_membership_product_id_product_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_group_membership_group_id_product_group_info_id_fk": { - "name": "product_group_membership_group_id_product_group_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_group_info", - "schemaTo": "mf", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_group_membership_pk": { - "name": "product_group_membership_pk", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "group_id" - ] - } - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "increment_step": { - "name": "increment_step", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "store_id": { - "name": "store_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "image_url": { - "name": "image_url", - "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.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0053_snapshot.json b/apps/backend/drizzle/meta/0053_snapshot.json deleted file mode 100644 index d86c845..0000000 --- a/apps/backend/drizzle/meta/0053_snapshot.json +++ /dev/null @@ -1,3163 +0,0 @@ -{ - "id": "5c480a1c-046b-46d4-a228-3953a5ef628e", - "prevId": "d7557b6f-c95b-4cf5-bc58-b74e319f1ba3", - "version": "7", - "dialect": "postgresql", - "tables": { - "mf.address_areas": { - "name": "address_areas", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_areas_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "place_name": { - "name": "place_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "address_areas_zone_id_address_zones_id_fk": { - "name": "address_areas_zone_id_address_zones_id_fk", - "tableFrom": "address_areas", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.address_zones": { - "name": "address_zones", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_zones_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "zone_name": { - "name": "zone_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "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 - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "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" - }, - "addresses_zone_id_address_zones_id_fk": { - "name": "addresses_zone_id_address_zones_id_fk", - "tableFrom": "addresses", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "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.home_banners": { - "name": "home_banners", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "home_banners_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 - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "product_ids": { - "name": "product_ids", - "type": "integer[]", - "primaryKey": false, - "notNull": false - }, - "redirect_url": { - "name": "redirect_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "serial_num": { - "name": "serial_num", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "is_active": { - "name": "is_active", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_updated": { - "name": "last_updated", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "is_packaged": { - "name": "is_packaged", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_package_verified": { - "name": "is_package_verified", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "delivery_charge": { - "name": "delivery_charge", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true, - "default": "'0'" - }, - "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_group_info": { - "name": "product_group_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_group_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "group_name": { - "name": "group_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()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_group_membership": { - "name": "product_group_membership", - "schema": "mf", - "columns": { - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "group_id": { - "name": "group_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_group_membership_product_id_product_info_id_fk": { - "name": "product_group_membership_product_id_product_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_group_membership_group_id_product_group_info_id_fk": { - "name": "product_group_membership_group_id_product_group_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_group_info", - "schemaTo": "mf", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_group_membership_pk": { - "name": "product_group_membership_pk", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "group_id" - ] - } - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "increment_step": { - "name": "increment_step", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "store_id": { - "name": "store_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "image_url": { - "name": "image_url", - "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.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0054_snapshot.json b/apps/backend/drizzle/meta/0054_snapshot.json deleted file mode 100644 index 5e5fce3..0000000 --- a/apps/backend/drizzle/meta/0054_snapshot.json +++ /dev/null @@ -1,3157 +0,0 @@ -{ - "id": "9fa36e99-9716-4ab3-a0d1-89e8ad7d7869", - "prevId": "5c480a1c-046b-46d4-a228-3953a5ef628e", - "version": "7", - "dialect": "postgresql", - "tables": { - "mf.address_areas": { - "name": "address_areas", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_areas_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "place_name": { - "name": "place_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "address_areas_zone_id_address_zones_id_fk": { - "name": "address_areas_zone_id_address_zones_id_fk", - "tableFrom": "address_areas", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.address_zones": { - "name": "address_zones", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_zones_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "zone_name": { - "name": "zone_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "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 - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "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" - }, - "addresses_zone_id_address_zones_id_fk": { - "name": "addresses_zone_id_address_zones_id_fk", - "tableFrom": "addresses", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "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.home_banners": { - "name": "home_banners", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "home_banners_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 - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "redirect_url": { - "name": "redirect_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "serial_num": { - "name": "serial_num", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "is_active": { - "name": "is_active", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_updated": { - "name": "last_updated", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "is_packaged": { - "name": "is_packaged", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_package_verified": { - "name": "is_package_verified", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "delivery_charge": { - "name": "delivery_charge", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true, - "default": "'0'" - }, - "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_group_info": { - "name": "product_group_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_group_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "group_name": { - "name": "group_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()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_group_membership": { - "name": "product_group_membership", - "schema": "mf", - "columns": { - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "group_id": { - "name": "group_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_group_membership_product_id_product_info_id_fk": { - "name": "product_group_membership_product_id_product_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_group_membership_group_id_product_group_info_id_fk": { - "name": "product_group_membership_group_id_product_group_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_group_info", - "schemaTo": "mf", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_group_membership_pk": { - "name": "product_group_membership_pk", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "group_id" - ] - } - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "increment_step": { - "name": "increment_step", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "store_id": { - "name": "store_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "image_url": { - "name": "image_url", - "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.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0055_snapshot.json b/apps/backend/drizzle/meta/0055_snapshot.json deleted file mode 100644 index 92fa7cd..0000000 --- a/apps/backend/drizzle/meta/0055_snapshot.json +++ /dev/null @@ -1,3163 +0,0 @@ -{ - "id": "eccbd1d7-e39e-46dd-8740-bd33822d474c", - "prevId": "9fa36e99-9716-4ab3-a0d1-89e8ad7d7869", - "version": "7", - "dialect": "postgresql", - "tables": { - "mf.address_areas": { - "name": "address_areas", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_areas_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "place_name": { - "name": "place_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "address_areas_zone_id_address_zones_id_fk": { - "name": "address_areas_zone_id_address_zones_id_fk", - "tableFrom": "address_areas", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.address_zones": { - "name": "address_zones", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_zones_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "zone_name": { - "name": "zone_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "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 - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "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" - }, - "addresses_zone_id_address_zones_id_fk": { - "name": "addresses_zone_id_address_zones_id_fk", - "tableFrom": "addresses", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "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.home_banners": { - "name": "home_banners", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "home_banners_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 - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "product_ids": { - "name": "product_ids", - "type": "integer[]", - "primaryKey": false, - "notNull": false - }, - "redirect_url": { - "name": "redirect_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "serial_num": { - "name": "serial_num", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "is_active": { - "name": "is_active", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_updated": { - "name": "last_updated", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "is_packaged": { - "name": "is_packaged", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_package_verified": { - "name": "is_package_verified", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "delivery_charge": { - "name": "delivery_charge", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true, - "default": "'0'" - }, - "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_group_info": { - "name": "product_group_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_group_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "group_name": { - "name": "group_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()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_group_membership": { - "name": "product_group_membership", - "schema": "mf", - "columns": { - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "group_id": { - "name": "group_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_group_membership_product_id_product_info_id_fk": { - "name": "product_group_membership_product_id_product_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_group_membership_group_id_product_group_info_id_fk": { - "name": "product_group_membership_group_id_product_group_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_group_info", - "schemaTo": "mf", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_group_membership_pk": { - "name": "product_group_membership_pk", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "group_id" - ] - } - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "increment_step": { - "name": "increment_step", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "store_id": { - "name": "store_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "image_url": { - "name": "image_url", - "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.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0056_snapshot.json b/apps/backend/drizzle/meta/0056_snapshot.json deleted file mode 100644 index 671492d..0000000 --- a/apps/backend/drizzle/meta/0056_snapshot.json +++ /dev/null @@ -1,3169 +0,0 @@ -{ - "id": "ad069c95-33d2-4658-aba0-26296197f466", - "prevId": "eccbd1d7-e39e-46dd-8740-bd33822d474c", - "version": "7", - "dialect": "postgresql", - "tables": { - "mf.address_areas": { - "name": "address_areas", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_areas_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "place_name": { - "name": "place_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "address_areas_zone_id_address_zones_id_fk": { - "name": "address_areas_zone_id_address_zones_id_fk", - "tableFrom": "address_areas", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.address_zones": { - "name": "address_zones", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_zones_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "zone_name": { - "name": "zone_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "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 - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "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" - }, - "addresses_zone_id_address_zones_id_fk": { - "name": "addresses_zone_id_address_zones_id_fk", - "tableFrom": "addresses", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "applicable_users": { - "name": "applicable_users", - "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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "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.home_banners": { - "name": "home_banners", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "home_banners_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 - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "product_ids": { - "name": "product_ids", - "type": "integer[]", - "primaryKey": false, - "notNull": false - }, - "redirect_url": { - "name": "redirect_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "serial_num": { - "name": "serial_num", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "is_active": { - "name": "is_active", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_updated": { - "name": "last_updated", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "is_packaged": { - "name": "is_packaged", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_package_verified": { - "name": "is_package_verified", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "delivery_charge": { - "name": "delivery_charge", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true, - "default": "'0'" - }, - "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_group_info": { - "name": "product_group_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_group_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "group_name": { - "name": "group_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()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_group_membership": { - "name": "product_group_membership", - "schema": "mf", - "columns": { - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "group_id": { - "name": "group_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_group_membership_product_id_product_info_id_fk": { - "name": "product_group_membership_product_id_product_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_group_membership_group_id_product_group_info_id_fk": { - "name": "product_group_membership_group_id_product_group_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_group_info", - "schemaTo": "mf", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_group_membership_pk": { - "name": "product_group_membership_pk", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "group_id" - ] - } - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "increment_step": { - "name": "increment_step", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "store_id": { - "name": "store_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "image_url": { - "name": "image_url", - "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.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0057_snapshot.json b/apps/backend/drizzle/meta/0057_snapshot.json deleted file mode 100644 index 1597d96..0000000 --- a/apps/backend/drizzle/meta/0057_snapshot.json +++ /dev/null @@ -1,3149 +0,0 @@ -{ - "id": "13c13452-4cb3-44a1-8146-1eef954ab69f", - "prevId": "ad069c95-33d2-4658-aba0-26296197f466", - "version": "7", - "dialect": "postgresql", - "tables": { - "mf.address_areas": { - "name": "address_areas", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_areas_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "place_name": { - "name": "place_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "address_areas_zone_id_address_zones_id_fk": { - "name": "address_areas_zone_id_address_zones_id_fk", - "tableFrom": "address_areas", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.address_zones": { - "name": "address_zones", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_zones_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "zone_name": { - "name": "zone_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "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 - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "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" - }, - "addresses_zone_id_address_zones_id_fk": { - "name": "addresses_zone_id_address_zones_id_fk", - "tableFrom": "addresses", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "applicable_users": { - "name": "applicable_users", - "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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "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.home_banners": { - "name": "home_banners", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "home_banners_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 - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "product_ids": { - "name": "product_ids", - "type": "integer[]", - "primaryKey": false, - "notNull": false - }, - "redirect_url": { - "name": "redirect_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "serial_num": { - "name": "serial_num", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "is_active": { - "name": "is_active", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_updated": { - "name": "last_updated", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "is_packaged": { - "name": "is_packaged", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_package_verified": { - "name": "is_package_verified", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "delivery_charge": { - "name": "delivery_charge", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true, - "default": "'0'" - }, - "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_group_info": { - "name": "product_group_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_group_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "group_name": { - "name": "group_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()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_group_membership": { - "name": "product_group_membership", - "schema": "mf", - "columns": { - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "group_id": { - "name": "group_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_group_membership_product_id_product_info_id_fk": { - "name": "product_group_membership_product_id_product_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_group_membership_group_id_product_group_info_id_fk": { - "name": "product_group_membership_group_id_product_group_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_group_info", - "schemaTo": "mf", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_group_membership_pk": { - "name": "product_group_membership_pk", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "group_id" - ] - } - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "increment_step": { - "name": "increment_step", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "store_id": { - "name": "store_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "image_url": { - "name": "image_url", - "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.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0058_snapshot.json b/apps/backend/drizzle/meta/0058_snapshot.json deleted file mode 100644 index c2f4153..0000000 --- a/apps/backend/drizzle/meta/0058_snapshot.json +++ /dev/null @@ -1,3161 +0,0 @@ -{ - "id": "eeb3ef97-16ed-4f66-91f1-2ac66fa1abb7", - "prevId": "13c13452-4cb3-44a1-8146-1eef954ab69f", - "version": "7", - "dialect": "postgresql", - "tables": { - "mf.address_areas": { - "name": "address_areas", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_areas_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "place_name": { - "name": "place_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "address_areas_zone_id_address_zones_id_fk": { - "name": "address_areas_zone_id_address_zones_id_fk", - "tableFrom": "address_areas", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.address_zones": { - "name": "address_zones", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_zones_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "zone_name": { - "name": "zone_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "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 - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "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" - }, - "addresses_zone_id_address_zones_id_fk": { - "name": "addresses_zone_id_address_zones_id_fk", - "tableFrom": "addresses", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "applicable_users": { - "name": "applicable_users", - "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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "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.home_banners": { - "name": "home_banners", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "home_banners_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 - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "product_ids": { - "name": "product_ids", - "type": "integer[]", - "primaryKey": false, - "notNull": false - }, - "redirect_url": { - "name": "redirect_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "serial_num": { - "name": "serial_num", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "is_active": { - "name": "is_active", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_updated": { - "name": "last_updated", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "is_packaged": { - "name": "is_packaged", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_package_verified": { - "name": "is_package_verified", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "delivery_charge": { - "name": "delivery_charge", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true, - "default": "'0'" - }, - "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 - }, - "order_group_id": { - "name": "order_group_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "order_group_proportion": { - "name": "order_group_proportion", - "type": "numeric(10, 4)", - "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_group_info": { - "name": "product_group_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_group_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "group_name": { - "name": "group_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()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_group_membership": { - "name": "product_group_membership", - "schema": "mf", - "columns": { - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "group_id": { - "name": "group_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_group_membership_product_id_product_info_id_fk": { - "name": "product_group_membership_product_id_product_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_group_membership_group_id_product_group_info_id_fk": { - "name": "product_group_membership_group_id_product_group_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_group_info", - "schemaTo": "mf", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_group_membership_pk": { - "name": "product_group_membership_pk", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "group_id" - ] - } - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "increment_step": { - "name": "increment_step", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "store_id": { - "name": "store_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "image_url": { - "name": "image_url", - "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.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0059_snapshot.json b/apps/backend/drizzle/meta/0059_snapshot.json deleted file mode 100644 index 82b7445..0000000 --- a/apps/backend/drizzle/meta/0059_snapshot.json +++ /dev/null @@ -1,3322 +0,0 @@ -{ - "id": "463513fe-d8c7-4357-a5d9-15a9c46a2346", - "prevId": "eeb3ef97-16ed-4f66-91f1-2ac66fa1abb7", - "version": "7", - "dialect": "postgresql", - "tables": { - "mf.address_areas": { - "name": "address_areas", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_areas_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "place_name": { - "name": "place_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "address_areas_zone_id_address_zones_id_fk": { - "name": "address_areas_zone_id_address_zones_id_fk", - "tableFrom": "address_areas", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.address_zones": { - "name": "address_zones", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_zones_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "zone_name": { - "name": "zone_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "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 - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "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" - }, - "addresses_zone_id_address_zones_id_fk": { - "name": "addresses_zone_id_address_zones_id_fk", - "tableFrom": "addresses", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "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.home_banners": { - "name": "home_banners", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "home_banners_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 - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "product_ids": { - "name": "product_ids", - "type": "integer[]", - "primaryKey": false, - "notNull": false - }, - "redirect_url": { - "name": "redirect_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "serial_num": { - "name": "serial_num", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "is_active": { - "name": "is_active", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_updated": { - "name": "last_updated", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "is_packaged": { - "name": "is_packaged", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_package_verified": { - "name": "is_package_verified", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "delivery_charge": { - "name": "delivery_charge", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true, - "default": "'0'" - }, - "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 - }, - "order_group_id": { - "name": "order_group_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "order_group_proportion": { - "name": "order_group_proportion", - "type": "numeric(10, 4)", - "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_group_info": { - "name": "product_group_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_group_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "group_name": { - "name": "group_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()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_group_membership": { - "name": "product_group_membership", - "schema": "mf", - "columns": { - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "group_id": { - "name": "group_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_group_membership_product_id_product_info_id_fk": { - "name": "product_group_membership_product_id_product_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_group_membership_group_id_product_group_info_id_fk": { - "name": "product_group_membership_group_id_product_group_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_group_info", - "schemaTo": "mf", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_group_membership_pk": { - "name": "product_group_membership_pk", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "group_id" - ] - } - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "increment_step": { - "name": "increment_step", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "store_id": { - "name": "store_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.reserved_coupons": { - "name": "reserved_coupons", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "reserved_coupons_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "secret_code": { - "name": "secret_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "coupon_code": { - "name": "coupon_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "max_value": { - "name": "max_value", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": 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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_redeemed": { - "name": "is_redeemed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "redeemed_by": { - "name": "redeemed_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "redeemed_at": { - "name": "redeemed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_by": { - "name": "created_by", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "reserved_coupons_redeemed_by_users_id_fk": { - "name": "reserved_coupons_redeemed_by_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "redeemed_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "reserved_coupons_created_by_staff_users_id_fk": { - "name": "reserved_coupons_created_by_staff_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "staff_users", - "schemaTo": "mf", - "columnsFrom": [ - "created_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reserved_coupons_secret_code_unique": { - "name": "reserved_coupons_secret_code_unique", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - }, - "unique_secret_code": { - "name": "unique_secret_code", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - } - }, - "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 - }, - "image_url": { - "name": "image_url", - "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.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0060_snapshot.json b/apps/backend/drizzle/meta/0060_snapshot.json deleted file mode 100644 index bf00379..0000000 --- a/apps/backend/drizzle/meta/0060_snapshot.json +++ /dev/null @@ -1,3551 +0,0 @@ -{ - "id": "270fae24-9b4f-4b74-ba93-89def9ca7a25", - "prevId": "463513fe-d8c7-4357-a5d9-15a9c46a2346", - "version": "7", - "dialect": "postgresql", - "tables": { - "mf.address_areas": { - "name": "address_areas", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_areas_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "place_name": { - "name": "place_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "address_areas_zone_id_address_zones_id_fk": { - "name": "address_areas_zone_id_address_zones_id_fk", - "tableFrom": "address_areas", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.address_zones": { - "name": "address_zones", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_zones_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "zone_name": { - "name": "zone_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "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 - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "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" - }, - "addresses_zone_id_address_zones_id_fk": { - "name": "addresses_zone_id_address_zones_id_fk", - "tableFrom": "addresses", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "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.home_banners": { - "name": "home_banners", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "home_banners_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 - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "product_ids": { - "name": "product_ids", - "type": "integer[]", - "primaryKey": false, - "notNull": false - }, - "redirect_url": { - "name": "redirect_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "serial_num": { - "name": "serial_num", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "is_active": { - "name": "is_active", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_updated": { - "name": "last_updated", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "is_packaged": { - "name": "is_packaged", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_package_verified": { - "name": "is_package_verified", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "delivery_charge": { - "name": "delivery_charge", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true, - "default": "'0'" - }, - "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 - }, - "order_group_id": { - "name": "order_group_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "order_group_proportion": { - "name": "order_group_proportion", - "type": "numeric(10, 4)", - "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_group_info": { - "name": "product_group_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_group_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "group_name": { - "name": "group_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()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_group_membership": { - "name": "product_group_membership", - "schema": "mf", - "columns": { - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "group_id": { - "name": "group_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_group_membership_product_id_product_info_id_fk": { - "name": "product_group_membership_product_id_product_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_group_membership_group_id_product_group_info_id_fk": { - "name": "product_group_membership_group_id_product_group_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_group_info", - "schemaTo": "mf", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_group_membership_pk": { - "name": "product_group_membership_pk", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "group_id" - ] - } - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "increment_step": { - "name": "increment_step", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "store_id": { - "name": "store_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.reserved_coupons": { - "name": "reserved_coupons", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "reserved_coupons_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "secret_code": { - "name": "secret_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "coupon_code": { - "name": "coupon_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "max_value": { - "name": "max_value", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": 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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_redeemed": { - "name": "is_redeemed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "redeemed_by": { - "name": "redeemed_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "redeemed_at": { - "name": "redeemed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_by": { - "name": "created_by", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "reserved_coupons_redeemed_by_users_id_fk": { - "name": "reserved_coupons_redeemed_by_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "redeemed_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "reserved_coupons_created_by_staff_users_id_fk": { - "name": "reserved_coupons_created_by_staff_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "staff_users", - "schemaTo": "mf", - "columnsFrom": [ - "created_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reserved_coupons_secret_code_unique": { - "name": "reserved_coupons_secret_code_unique", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - }, - "unique_secret_code": { - "name": "unique_secret_code", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - } - }, - "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_permissions": { - "name": "staff_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "permission_name": { - "name": "permission_name", - "type": "staff_permission", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_permission_name": { - "name": "unique_permission_name", - "nullsNotDistinct": false, - "columns": [ - "permission_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_role_permissions": { - "name": "staff_role_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_role_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "staff_permission_id": { - "name": "staff_permission_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_role_permissions_staff_role_id_staff_roles_id_fk": { - "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": { - "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_permissions", - "schemaTo": "mf", - "columnsFrom": [ - "staff_permission_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_permission": { - "name": "unique_role_permission", - "nullsNotDistinct": false, - "columns": [ - "staff_role_id", - "staff_permission_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_roles": { - "name": "staff_roles", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_roles_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "role_name": { - "name": "role_name", - "type": "staff_role", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_name": { - "name": "unique_role_name", - "nullsNotDistinct": false, - "columns": [ - "role_name" - ] - } - }, - "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 - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_users_staff_role_id_staff_roles_id_fk": { - "name": "staff_users_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_users", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "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 - }, - "image_url": { - "name": "image_url", - "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.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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" - ] - }, - "public.staff_permission": { - "name": "staff_permission", - "schema": "public", - "values": [ - "crud_product", - "make_coupon" - ] - }, - "public.staff_role": { - "name": "staff_role", - "schema": "public", - "values": [ - "admin", - "marketer", - "delivery_staff" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0061_snapshot.json b/apps/backend/drizzle/meta/0061_snapshot.json deleted file mode 100644 index a4d9566..0000000 --- a/apps/backend/drizzle/meta/0061_snapshot.json +++ /dev/null @@ -1,3553 +0,0 @@ -{ - "id": "eeb83ecd-6c96-46c9-8ddc-d9e406182c75", - "prevId": "270fae24-9b4f-4b74-ba93-89def9ca7a25", - "version": "7", - "dialect": "postgresql", - "tables": { - "mf.address_areas": { - "name": "address_areas", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_areas_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "place_name": { - "name": "place_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "address_areas_zone_id_address_zones_id_fk": { - "name": "address_areas_zone_id_address_zones_id_fk", - "tableFrom": "address_areas", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.address_zones": { - "name": "address_zones", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_zones_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "zone_name": { - "name": "zone_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "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 - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "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" - }, - "addresses_zone_id_address_zones_id_fk": { - "name": "addresses_zone_id_address_zones_id_fk", - "tableFrom": "addresses", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "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.home_banners": { - "name": "home_banners", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "home_banners_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 - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "product_ids": { - "name": "product_ids", - "type": "integer[]", - "primaryKey": false, - "notNull": false - }, - "redirect_url": { - "name": "redirect_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "serial_num": { - "name": "serial_num", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "is_active": { - "name": "is_active", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_updated": { - "name": "last_updated", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "is_packaged": { - "name": "is_packaged", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_package_verified": { - "name": "is_package_verified", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "delivery_charge": { - "name": "delivery_charge", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true, - "default": "'0'" - }, - "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 - }, - "order_group_id": { - "name": "order_group_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "order_group_proportion": { - "name": "order_group_proportion", - "type": "numeric(10, 4)", - "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_group_info": { - "name": "product_group_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_group_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "group_name": { - "name": "group_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()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_group_membership": { - "name": "product_group_membership", - "schema": "mf", - "columns": { - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "group_id": { - "name": "group_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_group_membership_product_id_product_info_id_fk": { - "name": "product_group_membership_product_id_product_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_group_membership_group_id_product_group_info_id_fk": { - "name": "product_group_membership_group_id_product_group_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_group_info", - "schemaTo": "mf", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_group_membership_pk": { - "name": "product_group_membership_pk", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "group_id" - ] - } - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "increment_step": { - "name": "increment_step", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "store_id": { - "name": "store_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.reserved_coupons": { - "name": "reserved_coupons", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "reserved_coupons_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "secret_code": { - "name": "secret_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "coupon_code": { - "name": "coupon_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "max_value": { - "name": "max_value", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": 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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_redeemed": { - "name": "is_redeemed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "redeemed_by": { - "name": "redeemed_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "redeemed_at": { - "name": "redeemed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_by": { - "name": "created_by", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "reserved_coupons_redeemed_by_users_id_fk": { - "name": "reserved_coupons_redeemed_by_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "redeemed_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "reserved_coupons_created_by_staff_users_id_fk": { - "name": "reserved_coupons_created_by_staff_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "staff_users", - "schemaTo": "mf", - "columnsFrom": [ - "created_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reserved_coupons_secret_code_unique": { - "name": "reserved_coupons_secret_code_unique", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - }, - "unique_secret_code": { - "name": "unique_secret_code", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - } - }, - "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_permissions": { - "name": "staff_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "permission_name": { - "name": "permission_name", - "type": "staff_permission", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_permission_name": { - "name": "unique_permission_name", - "nullsNotDistinct": false, - "columns": [ - "permission_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_role_permissions": { - "name": "staff_role_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_role_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "staff_permission_id": { - "name": "staff_permission_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_role_permissions_staff_role_id_staff_roles_id_fk": { - "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": { - "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_permissions", - "schemaTo": "mf", - "columnsFrom": [ - "staff_permission_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_permission": { - "name": "unique_role_permission", - "nullsNotDistinct": false, - "columns": [ - "staff_role_id", - "staff_permission_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_roles": { - "name": "staff_roles", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_roles_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "role_name": { - "name": "role_name", - "type": "staff_role", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_name": { - "name": "unique_role_name", - "nullsNotDistinct": false, - "columns": [ - "role_name" - ] - } - }, - "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 - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_users_staff_role_id_staff_roles_id_fk": { - "name": "staff_users_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_users", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "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 - }, - "image_url": { - "name": "image_url", - "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.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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" - ] - }, - "public.staff_permission": { - "name": "staff_permission", - "schema": "public", - "values": [ - "crud_product", - "make_coupon", - "crud_staff_users" - ] - }, - "public.staff_role": { - "name": "staff_role", - "schema": "public", - "values": [ - "super_admin", - "admin", - "marketer", - "delivery_staff" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0062_snapshot.json b/apps/backend/drizzle/meta/0062_snapshot.json deleted file mode 100644 index cbfb1bf..0000000 --- a/apps/backend/drizzle/meta/0062_snapshot.json +++ /dev/null @@ -1,3553 +0,0 @@ -{ - "id": "d7ef9e64-f6c0-4817-94ad-32c6b3cb31ce", - "prevId": "eeb83ecd-6c96-46c9-8ddc-d9e406182c75", - "version": "7", - "dialect": "postgresql", - "tables": { - "mf.address_areas": { - "name": "address_areas", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_areas_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "place_name": { - "name": "place_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "address_areas_zone_id_address_zones_id_fk": { - "name": "address_areas_zone_id_address_zones_id_fk", - "tableFrom": "address_areas", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.address_zones": { - "name": "address_zones", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_zones_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "zone_name": { - "name": "zone_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "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 - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "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" - }, - "addresses_zone_id_address_zones_id_fk": { - "name": "addresses_zone_id_address_zones_id_fk", - "tableFrom": "addresses", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_by": { - "name": "created_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "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.home_banners": { - "name": "home_banners", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "home_banners_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 - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "product_ids": { - "name": "product_ids", - "type": "integer[]", - "primaryKey": false, - "notNull": false - }, - "redirect_url": { - "name": "redirect_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "serial_num": { - "name": "serial_num", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "is_active": { - "name": "is_active", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_updated": { - "name": "last_updated", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "is_packaged": { - "name": "is_packaged", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_package_verified": { - "name": "is_package_verified", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "delivery_charge": { - "name": "delivery_charge", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true, - "default": "'0'" - }, - "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 - }, - "order_group_id": { - "name": "order_group_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "order_group_proportion": { - "name": "order_group_proportion", - "type": "numeric(10, 4)", - "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_group_info": { - "name": "product_group_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_group_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "group_name": { - "name": "group_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()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_group_membership": { - "name": "product_group_membership", - "schema": "mf", - "columns": { - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "group_id": { - "name": "group_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_group_membership_product_id_product_info_id_fk": { - "name": "product_group_membership_product_id_product_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_group_membership_group_id_product_group_info_id_fk": { - "name": "product_group_membership_group_id_product_group_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_group_info", - "schemaTo": "mf", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_group_membership_pk": { - "name": "product_group_membership_pk", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "group_id" - ] - } - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "increment_step": { - "name": "increment_step", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "store_id": { - "name": "store_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.reserved_coupons": { - "name": "reserved_coupons", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "reserved_coupons_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "secret_code": { - "name": "secret_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "coupon_code": { - "name": "coupon_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "max_value": { - "name": "max_value", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": 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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_redeemed": { - "name": "is_redeemed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "redeemed_by": { - "name": "redeemed_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "redeemed_at": { - "name": "redeemed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_by": { - "name": "created_by", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "reserved_coupons_redeemed_by_users_id_fk": { - "name": "reserved_coupons_redeemed_by_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "redeemed_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "reserved_coupons_created_by_staff_users_id_fk": { - "name": "reserved_coupons_created_by_staff_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "staff_users", - "schemaTo": "mf", - "columnsFrom": [ - "created_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reserved_coupons_secret_code_unique": { - "name": "reserved_coupons_secret_code_unique", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - }, - "unique_secret_code": { - "name": "unique_secret_code", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - } - }, - "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_permissions": { - "name": "staff_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "permission_name": { - "name": "permission_name", - "type": "staff_permission", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_permission_name": { - "name": "unique_permission_name", - "nullsNotDistinct": false, - "columns": [ - "permission_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_role_permissions": { - "name": "staff_role_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_role_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "staff_permission_id": { - "name": "staff_permission_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_role_permissions_staff_role_id_staff_roles_id_fk": { - "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": { - "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_permissions", - "schemaTo": "mf", - "columnsFrom": [ - "staff_permission_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_permission": { - "name": "unique_role_permission", - "nullsNotDistinct": false, - "columns": [ - "staff_role_id", - "staff_permission_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_roles": { - "name": "staff_roles", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_roles_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "role_name": { - "name": "role_name", - "type": "staff_role", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_name": { - "name": "unique_role_name", - "nullsNotDistinct": false, - "columns": [ - "role_name" - ] - } - }, - "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 - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_users_staff_role_id_staff_roles_id_fk": { - "name": "staff_users_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_users", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "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 - }, - "image_url": { - "name": "image_url", - "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.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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" - ] - }, - "public.staff_permission": { - "name": "staff_permission", - "schema": "public", - "values": [ - "crud_product", - "make_coupon", - "crud_staff_users" - ] - }, - "public.staff_role": { - "name": "staff_role", - "schema": "public", - "values": [ - "super_admin", - "admin", - "marketer", - "delivery_staff" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0063_snapshot.json b/apps/backend/drizzle/meta/0063_snapshot.json deleted file mode 100644 index c901b9e..0000000 --- a/apps/backend/drizzle/meta/0063_snapshot.json +++ /dev/null @@ -1,3573 +0,0 @@ -{ - "id": "f5076fcd-12d5-44ba-a1a7-85d431285ab5", - "prevId": "d7ef9e64-f6c0-4817-94ad-32c6b3cb31ce", - "version": "7", - "dialect": "postgresql", - "tables": { - "mf.address_areas": { - "name": "address_areas", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_areas_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "place_name": { - "name": "place_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "address_areas_zone_id_address_zones_id_fk": { - "name": "address_areas_zone_id_address_zones_id_fk", - "tableFrom": "address_areas", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.address_zones": { - "name": "address_zones", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_zones_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "zone_name": { - "name": "zone_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "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 - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "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" - }, - "addresses_zone_id_address_zones_id_fk": { - "name": "addresses_zone_id_address_zones_id_fk", - "tableFrom": "addresses", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_by": { - "name": "created_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "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 - }, - "is_flash": { - "name": "is_flash", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "delivery_sequence": { - "name": "delivery_sequence", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.home_banners": { - "name": "home_banners", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "home_banners_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 - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "product_ids": { - "name": "product_ids", - "type": "integer[]", - "primaryKey": false, - "notNull": false - }, - "redirect_url": { - "name": "redirect_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "serial_num": { - "name": "serial_num", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "is_active": { - "name": "is_active", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_updated": { - "name": "last_updated", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "is_packaged": { - "name": "is_packaged", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_package_verified": { - "name": "is_package_verified", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "delivery_charge": { - "name": "delivery_charge", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true, - "default": "'0'" - }, - "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 - }, - "order_group_id": { - "name": "order_group_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "order_group_proportion": { - "name": "order_group_proportion", - "type": "numeric(10, 4)", - "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_group_info": { - "name": "product_group_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_group_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "group_name": { - "name": "group_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()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_group_membership": { - "name": "product_group_membership", - "schema": "mf", - "columns": { - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "group_id": { - "name": "group_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_group_membership_product_id_product_info_id_fk": { - "name": "product_group_membership_product_id_product_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_group_membership_group_id_product_group_info_id_fk": { - "name": "product_group_membership_group_id_product_group_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_group_info", - "schemaTo": "mf", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_group_membership_pk": { - "name": "product_group_membership_pk", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "group_id" - ] - } - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_flash_available": { - "name": "is_flash_available", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "flash_price": { - "name": "flash_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "increment_step": { - "name": "increment_step", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "store_id": { - "name": "store_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.reserved_coupons": { - "name": "reserved_coupons", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "reserved_coupons_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "secret_code": { - "name": "secret_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "coupon_code": { - "name": "coupon_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "max_value": { - "name": "max_value", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": 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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_redeemed": { - "name": "is_redeemed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "redeemed_by": { - "name": "redeemed_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "redeemed_at": { - "name": "redeemed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_by": { - "name": "created_by", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "reserved_coupons_redeemed_by_users_id_fk": { - "name": "reserved_coupons_redeemed_by_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "redeemed_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "reserved_coupons_created_by_staff_users_id_fk": { - "name": "reserved_coupons_created_by_staff_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "staff_users", - "schemaTo": "mf", - "columnsFrom": [ - "created_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reserved_coupons_secret_code_unique": { - "name": "reserved_coupons_secret_code_unique", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - }, - "unique_secret_code": { - "name": "unique_secret_code", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - } - }, - "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_permissions": { - "name": "staff_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "permission_name": { - "name": "permission_name", - "type": "staff_permission", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_permission_name": { - "name": "unique_permission_name", - "nullsNotDistinct": false, - "columns": [ - "permission_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_role_permissions": { - "name": "staff_role_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_role_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "staff_permission_id": { - "name": "staff_permission_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_role_permissions_staff_role_id_staff_roles_id_fk": { - "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": { - "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_permissions", - "schemaTo": "mf", - "columnsFrom": [ - "staff_permission_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_permission": { - "name": "unique_role_permission", - "nullsNotDistinct": false, - "columns": [ - "staff_role_id", - "staff_permission_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_roles": { - "name": "staff_roles", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_roles_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "role_name": { - "name": "role_name", - "type": "staff_role", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_name": { - "name": "unique_role_name", - "nullsNotDistinct": false, - "columns": [ - "role_name" - ] - } - }, - "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 - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_users_staff_role_id_staff_roles_id_fk": { - "name": "staff_users_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_users", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "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 - }, - "image_url": { - "name": "image_url", - "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.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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" - ] - }, - "public.staff_permission": { - "name": "staff_permission", - "schema": "public", - "values": [ - "crud_product", - "make_coupon", - "crud_staff_users" - ] - }, - "public.staff_role": { - "name": "staff_role", - "schema": "public", - "values": [ - "super_admin", - "admin", - "marketer", - "delivery_staff" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0064_snapshot.json b/apps/backend/drizzle/meta/0064_snapshot.json deleted file mode 100644 index 6a3d2c8..0000000 --- a/apps/backend/drizzle/meta/0064_snapshot.json +++ /dev/null @@ -1,3580 +0,0 @@ -{ - "id": "37e45f91-69d0-4b4e-b679-b03ed83c2fd7", - "prevId": "f5076fcd-12d5-44ba-a1a7-85d431285ab5", - "version": "7", - "dialect": "postgresql", - "tables": { - "mf.address_areas": { - "name": "address_areas", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_areas_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "place_name": { - "name": "place_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "address_areas_zone_id_address_zones_id_fk": { - "name": "address_areas_zone_id_address_zones_id_fk", - "tableFrom": "address_areas", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.address_zones": { - "name": "address_zones", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_zones_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "zone_name": { - "name": "zone_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "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 - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "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" - }, - "addresses_zone_id_address_zones_id_fk": { - "name": "addresses_zone_id_address_zones_id_fk", - "tableFrom": "addresses", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_by": { - "name": "created_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "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 - }, - "is_flash": { - "name": "is_flash", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "delivery_sequence": { - "name": "delivery_sequence", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.home_banners": { - "name": "home_banners", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "home_banners_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 - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "product_ids": { - "name": "product_ids", - "type": "integer[]", - "primaryKey": false, - "notNull": false - }, - "redirect_url": { - "name": "redirect_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "serial_num": { - "name": "serial_num", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "is_active": { - "name": "is_active", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_updated": { - "name": "last_updated", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "is_packaged": { - "name": "is_packaged", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_package_verified": { - "name": "is_package_verified", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "delivery_charge": { - "name": "delivery_charge", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true, - "default": "'0'" - }, - "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 - }, - "order_group_id": { - "name": "order_group_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "order_group_proportion": { - "name": "order_group_proportion", - "type": "numeric(10, 4)", - "primaryKey": false, - "notNull": false - }, - "is_flash_delivery": { - "name": "is_flash_delivery", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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_group_info": { - "name": "product_group_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_group_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "group_name": { - "name": "group_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()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_group_membership": { - "name": "product_group_membership", - "schema": "mf", - "columns": { - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "group_id": { - "name": "group_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_group_membership_product_id_product_info_id_fk": { - "name": "product_group_membership_product_id_product_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_group_membership_group_id_product_group_info_id_fk": { - "name": "product_group_membership_group_id_product_group_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_group_info", - "schemaTo": "mf", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_group_membership_pk": { - "name": "product_group_membership_pk", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "group_id" - ] - } - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_flash_available": { - "name": "is_flash_available", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "flash_price": { - "name": "flash_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "increment_step": { - "name": "increment_step", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "store_id": { - "name": "store_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.reserved_coupons": { - "name": "reserved_coupons", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "reserved_coupons_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "secret_code": { - "name": "secret_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "coupon_code": { - "name": "coupon_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "max_value": { - "name": "max_value", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": 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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_redeemed": { - "name": "is_redeemed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "redeemed_by": { - "name": "redeemed_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "redeemed_at": { - "name": "redeemed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_by": { - "name": "created_by", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "reserved_coupons_redeemed_by_users_id_fk": { - "name": "reserved_coupons_redeemed_by_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "redeemed_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "reserved_coupons_created_by_staff_users_id_fk": { - "name": "reserved_coupons_created_by_staff_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "staff_users", - "schemaTo": "mf", - "columnsFrom": [ - "created_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reserved_coupons_secret_code_unique": { - "name": "reserved_coupons_secret_code_unique", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - }, - "unique_secret_code": { - "name": "unique_secret_code", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - } - }, - "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_permissions": { - "name": "staff_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "permission_name": { - "name": "permission_name", - "type": "staff_permission", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_permission_name": { - "name": "unique_permission_name", - "nullsNotDistinct": false, - "columns": [ - "permission_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_role_permissions": { - "name": "staff_role_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_role_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "staff_permission_id": { - "name": "staff_permission_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_role_permissions_staff_role_id_staff_roles_id_fk": { - "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": { - "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_permissions", - "schemaTo": "mf", - "columnsFrom": [ - "staff_permission_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_permission": { - "name": "unique_role_permission", - "nullsNotDistinct": false, - "columns": [ - "staff_role_id", - "staff_permission_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_roles": { - "name": "staff_roles", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_roles_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "role_name": { - "name": "role_name", - "type": "staff_role", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_name": { - "name": "unique_role_name", - "nullsNotDistinct": false, - "columns": [ - "role_name" - ] - } - }, - "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 - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_users_staff_role_id_staff_roles_id_fk": { - "name": "staff_users_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_users", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "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 - }, - "image_url": { - "name": "image_url", - "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.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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" - ] - }, - "public.staff_permission": { - "name": "staff_permission", - "schema": "public", - "values": [ - "crud_product", - "make_coupon", - "crud_staff_users" - ] - }, - "public.staff_role": { - "name": "staff_role", - "schema": "public", - "values": [ - "super_admin", - "admin", - "marketer", - "delivery_staff" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0065_snapshot.json b/apps/backend/drizzle/meta/0065_snapshot.json deleted file mode 100644 index b03b2c2..0000000 --- a/apps/backend/drizzle/meta/0065_snapshot.json +++ /dev/null @@ -1,3587 +0,0 @@ -{ - "id": "ef1b71bc-2303-4273-8941-56ec011575fd", - "prevId": "37e45f91-69d0-4b4e-b679-b03ed83c2fd7", - "version": "7", - "dialect": "postgresql", - "tables": { - "mf.address_areas": { - "name": "address_areas", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_areas_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "place_name": { - "name": "place_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "address_areas_zone_id_address_zones_id_fk": { - "name": "address_areas_zone_id_address_zones_id_fk", - "tableFrom": "address_areas", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.address_zones": { - "name": "address_zones", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_zones_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "zone_name": { - "name": "zone_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "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 - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "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" - }, - "addresses_zone_id_address_zones_id_fk": { - "name": "addresses_zone_id_address_zones_id_fk", - "tableFrom": "addresses", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_by": { - "name": "created_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "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 - }, - "is_flash": { - "name": "is_flash", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "delivery_sequence": { - "name": "delivery_sequence", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.home_banners": { - "name": "home_banners", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "home_banners_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 - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "product_ids": { - "name": "product_ids", - "type": "integer[]", - "primaryKey": false, - "notNull": false - }, - "redirect_url": { - "name": "redirect_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "serial_num": { - "name": "serial_num", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "is_active": { - "name": "is_active", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_updated": { - "name": "last_updated", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "is_packaged": { - "name": "is_packaged", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_package_verified": { - "name": "is_package_verified", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "delivery_charge": { - "name": "delivery_charge", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true, - "default": "'0'" - }, - "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 - }, - "order_group_id": { - "name": "order_group_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "order_group_proportion": { - "name": "order_group_proportion", - "type": "numeric(10, 4)", - "primaryKey": false, - "notNull": false - }, - "is_flash_delivery": { - "name": "is_flash_delivery", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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_group_info": { - "name": "product_group_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_group_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "group_name": { - "name": "group_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()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_group_membership": { - "name": "product_group_membership", - "schema": "mf", - "columns": { - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "group_id": { - "name": "group_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_group_membership_product_id_product_info_id_fk": { - "name": "product_group_membership_product_id_product_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_group_membership_group_id_product_group_info_id_fk": { - "name": "product_group_membership_group_id_product_group_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_group_info", - "schemaTo": "mf", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_group_membership_pk": { - "name": "product_group_membership_pk", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "group_id" - ] - } - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_flash_available": { - "name": "is_flash_available", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "flash_price": { - "name": "flash_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "increment_step": { - "name": "increment_step", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "product_quantity": { - "name": "product_quantity", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "store_id": { - "name": "store_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.reserved_coupons": { - "name": "reserved_coupons", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "reserved_coupons_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "secret_code": { - "name": "secret_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "coupon_code": { - "name": "coupon_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "max_value": { - "name": "max_value", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": 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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_redeemed": { - "name": "is_redeemed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "redeemed_by": { - "name": "redeemed_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "redeemed_at": { - "name": "redeemed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_by": { - "name": "created_by", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "reserved_coupons_redeemed_by_users_id_fk": { - "name": "reserved_coupons_redeemed_by_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "redeemed_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "reserved_coupons_created_by_staff_users_id_fk": { - "name": "reserved_coupons_created_by_staff_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "staff_users", - "schemaTo": "mf", - "columnsFrom": [ - "created_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reserved_coupons_secret_code_unique": { - "name": "reserved_coupons_secret_code_unique", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - }, - "unique_secret_code": { - "name": "unique_secret_code", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - } - }, - "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_permissions": { - "name": "staff_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "permission_name": { - "name": "permission_name", - "type": "staff_permission", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_permission_name": { - "name": "unique_permission_name", - "nullsNotDistinct": false, - "columns": [ - "permission_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_role_permissions": { - "name": "staff_role_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_role_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "staff_permission_id": { - "name": "staff_permission_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_role_permissions_staff_role_id_staff_roles_id_fk": { - "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": { - "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_permissions", - "schemaTo": "mf", - "columnsFrom": [ - "staff_permission_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_permission": { - "name": "unique_role_permission", - "nullsNotDistinct": false, - "columns": [ - "staff_role_id", - "staff_permission_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_roles": { - "name": "staff_roles", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_roles_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "role_name": { - "name": "role_name", - "type": "staff_role", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_name": { - "name": "unique_role_name", - "nullsNotDistinct": false, - "columns": [ - "role_name" - ] - } - }, - "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 - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_users_staff_role_id_staff_roles_id_fk": { - "name": "staff_users_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_users", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "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 - }, - "image_url": { - "name": "image_url", - "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.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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" - ] - }, - "public.staff_permission": { - "name": "staff_permission", - "schema": "public", - "values": [ - "crud_product", - "make_coupon", - "crud_staff_users" - ] - }, - "public.staff_role": { - "name": "staff_role", - "schema": "public", - "values": [ - "super_admin", - "admin", - "marketer", - "delivery_staff" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0066_snapshot.json b/apps/backend/drizzle/meta/0066_snapshot.json deleted file mode 100644 index 468009c..0000000 --- a/apps/backend/drizzle/meta/0066_snapshot.json +++ /dev/null @@ -1,3593 +0,0 @@ -{ - "id": "f105c79e-a657-457d-a49a-314b998b4ed3", - "prevId": "ef1b71bc-2303-4273-8941-56ec011575fd", - "version": "7", - "dialect": "postgresql", - "tables": { - "mf.address_areas": { - "name": "address_areas", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_areas_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "place_name": { - "name": "place_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "address_areas_zone_id_address_zones_id_fk": { - "name": "address_areas_zone_id_address_zones_id_fk", - "tableFrom": "address_areas", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.address_zones": { - "name": "address_zones", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_zones_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "zone_name": { - "name": "zone_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "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 - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "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" - }, - "addresses_zone_id_address_zones_id_fk": { - "name": "addresses_zone_id_address_zones_id_fk", - "tableFrom": "addresses", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_by": { - "name": "created_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "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 - }, - "is_flash": { - "name": "is_flash", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "delivery_sequence": { - "name": "delivery_sequence", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.home_banners": { - "name": "home_banners", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "home_banners_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 - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "product_ids": { - "name": "product_ids", - "type": "integer[]", - "primaryKey": false, - "notNull": false - }, - "redirect_url": { - "name": "redirect_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "serial_num": { - "name": "serial_num", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "is_active": { - "name": "is_active", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_updated": { - "name": "last_updated", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "is_packaged": { - "name": "is_packaged", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_package_verified": { - "name": "is_package_verified", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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 - }, - "is_cancelled_by_admin": { - "name": "is_cancelled_by_admin", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "payment_state": { - "name": "payment_state", - "type": "payment_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "delivery_charge": { - "name": "delivery_charge", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true, - "default": "'0'" - }, - "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 - }, - "order_group_id": { - "name": "order_group_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "order_group_proportion": { - "name": "order_group_proportion", - "type": "numeric(10, 4)", - "primaryKey": false, - "notNull": false - }, - "is_flash_delivery": { - "name": "is_flash_delivery", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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_group_info": { - "name": "product_group_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_group_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "group_name": { - "name": "group_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()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_group_membership": { - "name": "product_group_membership", - "schema": "mf", - "columns": { - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "group_id": { - "name": "group_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_group_membership_product_id_product_info_id_fk": { - "name": "product_group_membership_product_id_product_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_group_membership_group_id_product_group_info_id_fk": { - "name": "product_group_membership_group_id_product_group_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_group_info", - "schemaTo": "mf", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_group_membership_pk": { - "name": "product_group_membership_pk", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "group_id" - ] - } - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_flash_available": { - "name": "is_flash_available", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "flash_price": { - "name": "flash_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "increment_step": { - "name": "increment_step", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "product_quantity": { - "name": "product_quantity", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "store_id": { - "name": "store_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.reserved_coupons": { - "name": "reserved_coupons", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "reserved_coupons_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "secret_code": { - "name": "secret_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "coupon_code": { - "name": "coupon_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "max_value": { - "name": "max_value", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": 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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_redeemed": { - "name": "is_redeemed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "redeemed_by": { - "name": "redeemed_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "redeemed_at": { - "name": "redeemed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_by": { - "name": "created_by", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "reserved_coupons_redeemed_by_users_id_fk": { - "name": "reserved_coupons_redeemed_by_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "redeemed_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "reserved_coupons_created_by_staff_users_id_fk": { - "name": "reserved_coupons_created_by_staff_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "staff_users", - "schemaTo": "mf", - "columnsFrom": [ - "created_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reserved_coupons_secret_code_unique": { - "name": "reserved_coupons_secret_code_unique", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - }, - "unique_secret_code": { - "name": "unique_secret_code", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - } - }, - "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_permissions": { - "name": "staff_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "permission_name": { - "name": "permission_name", - "type": "staff_permission", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_permission_name": { - "name": "unique_permission_name", - "nullsNotDistinct": false, - "columns": [ - "permission_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_role_permissions": { - "name": "staff_role_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_role_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "staff_permission_id": { - "name": "staff_permission_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_role_permissions_staff_role_id_staff_roles_id_fk": { - "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": { - "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_permissions", - "schemaTo": "mf", - "columnsFrom": [ - "staff_permission_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_permission": { - "name": "unique_role_permission", - "nullsNotDistinct": false, - "columns": [ - "staff_role_id", - "staff_permission_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_roles": { - "name": "staff_roles", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_roles_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "role_name": { - "name": "role_name", - "type": "staff_role", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_name": { - "name": "unique_role_name", - "nullsNotDistinct": false, - "columns": [ - "role_name" - ] - } - }, - "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 - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_users_staff_role_id_staff_roles_id_fk": { - "name": "staff_users_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_users", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "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 - }, - "image_url": { - "name": "image_url", - "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.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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" - ] - }, - "public.staff_permission": { - "name": "staff_permission", - "schema": "public", - "values": [ - "crud_product", - "make_coupon", - "crud_staff_users" - ] - }, - "public.staff_role": { - "name": "staff_role", - "schema": "public", - "values": [ - "super_admin", - "admin", - "marketer", - "delivery_staff" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0067_snapshot.json b/apps/backend/drizzle/meta/0067_snapshot.json deleted file mode 100644 index 9001f9d..0000000 --- a/apps/backend/drizzle/meta/0067_snapshot.json +++ /dev/null @@ -1,3600 +0,0 @@ -{ - "id": "5da5eca2-307f-4098-a9c7-9fcaaac5c3e2", - "prevId": "f105c79e-a657-457d-a49a-314b998b4ed3", - "version": "7", - "dialect": "postgresql", - "tables": { - "mf.address_areas": { - "name": "address_areas", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_areas_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "place_name": { - "name": "place_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "address_areas_zone_id_address_zones_id_fk": { - "name": "address_areas_zone_id_address_zones_id_fk", - "tableFrom": "address_areas", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.address_zones": { - "name": "address_zones", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_zones_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "zone_name": { - "name": "zone_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "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 - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "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" - }, - "addresses_zone_id_address_zones_id_fk": { - "name": "addresses_zone_id_address_zones_id_fk", - "tableFrom": "addresses", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_by": { - "name": "created_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "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 - }, - "is_flash": { - "name": "is_flash", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "delivery_sequence": { - "name": "delivery_sequence", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.home_banners": { - "name": "home_banners", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "home_banners_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 - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "product_ids": { - "name": "product_ids", - "type": "integer[]", - "primaryKey": false, - "notNull": false - }, - "redirect_url": { - "name": "redirect_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "serial_num": { - "name": "serial_num", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "is_active": { - "name": "is_active", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_updated": { - "name": "last_updated", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "is_packaged": { - "name": "is_packaged", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_package_verified": { - "name": "is_package_verified", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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 - }, - "is_cancelled_by_admin": { - "name": "is_cancelled_by_admin", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "payment_state": { - "name": "payment_state", - "type": "payment_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "delivery_charge": { - "name": "delivery_charge", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true, - "default": "'0'" - }, - "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 - }, - "order_group_id": { - "name": "order_group_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "order_group_proportion": { - "name": "order_group_proportion", - "type": "numeric(10, 4)", - "primaryKey": false, - "notNull": false - }, - "is_flash_delivery": { - "name": "is_flash_delivery", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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_group_info": { - "name": "product_group_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_group_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "group_name": { - "name": "group_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()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_group_membership": { - "name": "product_group_membership", - "schema": "mf", - "columns": { - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "group_id": { - "name": "group_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_group_membership_product_id_product_info_id_fk": { - "name": "product_group_membership_product_id_product_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_group_membership_group_id_product_group_info_id_fk": { - "name": "product_group_membership_group_id_product_group_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_group_info", - "schemaTo": "mf", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_group_membership_pk": { - "name": "product_group_membership_pk", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "group_id" - ] - } - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_flash_available": { - "name": "is_flash_available", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "flash_price": { - "name": "flash_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "increment_step": { - "name": "increment_step", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "product_quantity": { - "name": "product_quantity", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "store_id": { - "name": "store_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.reserved_coupons": { - "name": "reserved_coupons", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "reserved_coupons_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "secret_code": { - "name": "secret_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "coupon_code": { - "name": "coupon_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "max_value": { - "name": "max_value", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": 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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_redeemed": { - "name": "is_redeemed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "redeemed_by": { - "name": "redeemed_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "redeemed_at": { - "name": "redeemed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_by": { - "name": "created_by", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "reserved_coupons_redeemed_by_users_id_fk": { - "name": "reserved_coupons_redeemed_by_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "redeemed_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "reserved_coupons_created_by_staff_users_id_fk": { - "name": "reserved_coupons_created_by_staff_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "staff_users", - "schemaTo": "mf", - "columnsFrom": [ - "created_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reserved_coupons_secret_code_unique": { - "name": "reserved_coupons_secret_code_unique", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - }, - "unique_secret_code": { - "name": "unique_secret_code", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - } - }, - "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_permissions": { - "name": "staff_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "permission_name": { - "name": "permission_name", - "type": "staff_permission", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_permission_name": { - "name": "unique_permission_name", - "nullsNotDistinct": false, - "columns": [ - "permission_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_role_permissions": { - "name": "staff_role_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_role_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "staff_permission_id": { - "name": "staff_permission_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_role_permissions_staff_role_id_staff_roles_id_fk": { - "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": { - "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_permissions", - "schemaTo": "mf", - "columnsFrom": [ - "staff_permission_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_permission": { - "name": "unique_role_permission", - "nullsNotDistinct": false, - "columns": [ - "staff_role_id", - "staff_permission_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_roles": { - "name": "staff_roles", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_roles_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "role_name": { - "name": "role_name", - "type": "staff_role", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_name": { - "name": "unique_role_name", - "nullsNotDistinct": false, - "columns": [ - "role_name" - ] - } - }, - "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 - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_users_staff_role_id_staff_roles_id_fk": { - "name": "staff_users_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_users", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "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 - }, - "image_url": { - "name": "image_url", - "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.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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": false - }, - "is_permanent": { - "name": "is_permanent", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "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" - ] - }, - "public.staff_permission": { - "name": "staff_permission", - "schema": "public", - "values": [ - "crud_product", - "make_coupon", - "crud_staff_users" - ] - }, - "public.staff_role": { - "name": "staff_role", - "schema": "public", - "values": [ - "super_admin", - "admin", - "marketer", - "delivery_staff" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0068_snapshot.json b/apps/backend/drizzle/meta/0068_snapshot.json deleted file mode 100644 index 5d27ef0..0000000 --- a/apps/backend/drizzle/meta/0068_snapshot.json +++ /dev/null @@ -1,3612 +0,0 @@ -{ - "id": "9e107cf4-10af-409c-b465-73740ca869e1", - "prevId": "5da5eca2-307f-4098-a9c7-9fcaaac5c3e2", - "version": "7", - "dialect": "postgresql", - "tables": { - "mf.address_areas": { - "name": "address_areas", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_areas_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "place_name": { - "name": "place_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "address_areas_zone_id_address_zones_id_fk": { - "name": "address_areas_zone_id_address_zones_id_fk", - "tableFrom": "address_areas", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.address_zones": { - "name": "address_zones", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_zones_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "zone_name": { - "name": "zone_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "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 - }, - "admin_latitude": { - "name": "admin_latitude", - "type": "real", - "primaryKey": false, - "notNull": false - }, - "admin_longitude": { - "name": "admin_longitude", - "type": "real", - "primaryKey": false, - "notNull": false - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "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" - }, - "addresses_zone_id_address_zones_id_fk": { - "name": "addresses_zone_id_address_zones_id_fk", - "tableFrom": "addresses", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_by": { - "name": "created_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "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 - }, - "is_flash": { - "name": "is_flash", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "delivery_sequence": { - "name": "delivery_sequence", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.home_banners": { - "name": "home_banners", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "home_banners_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 - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "product_ids": { - "name": "product_ids", - "type": "integer[]", - "primaryKey": false, - "notNull": false - }, - "redirect_url": { - "name": "redirect_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "serial_num": { - "name": "serial_num", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "is_active": { - "name": "is_active", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_updated": { - "name": "last_updated", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "is_packaged": { - "name": "is_packaged", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_package_verified": { - "name": "is_package_verified", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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 - }, - "is_cancelled_by_admin": { - "name": "is_cancelled_by_admin", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "payment_state": { - "name": "payment_state", - "type": "payment_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "delivery_charge": { - "name": "delivery_charge", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true, - "default": "'0'" - }, - "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 - }, - "order_group_id": { - "name": "order_group_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "order_group_proportion": { - "name": "order_group_proportion", - "type": "numeric(10, 4)", - "primaryKey": false, - "notNull": false - }, - "is_flash_delivery": { - "name": "is_flash_delivery", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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_group_info": { - "name": "product_group_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_group_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "group_name": { - "name": "group_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()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_group_membership": { - "name": "product_group_membership", - "schema": "mf", - "columns": { - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "group_id": { - "name": "group_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_group_membership_product_id_product_info_id_fk": { - "name": "product_group_membership_product_id_product_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_group_membership_group_id_product_group_info_id_fk": { - "name": "product_group_membership_group_id_product_group_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_group_info", - "schemaTo": "mf", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_group_membership_pk": { - "name": "product_group_membership_pk", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "group_id" - ] - } - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_flash_available": { - "name": "is_flash_available", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "flash_price": { - "name": "flash_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "increment_step": { - "name": "increment_step", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "product_quantity": { - "name": "product_quantity", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "store_id": { - "name": "store_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.reserved_coupons": { - "name": "reserved_coupons", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "reserved_coupons_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "secret_code": { - "name": "secret_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "coupon_code": { - "name": "coupon_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "max_value": { - "name": "max_value", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": 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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_redeemed": { - "name": "is_redeemed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "redeemed_by": { - "name": "redeemed_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "redeemed_at": { - "name": "redeemed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_by": { - "name": "created_by", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "reserved_coupons_redeemed_by_users_id_fk": { - "name": "reserved_coupons_redeemed_by_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "redeemed_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "reserved_coupons_created_by_staff_users_id_fk": { - "name": "reserved_coupons_created_by_staff_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "staff_users", - "schemaTo": "mf", - "columnsFrom": [ - "created_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reserved_coupons_secret_code_unique": { - "name": "reserved_coupons_secret_code_unique", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - }, - "unique_secret_code": { - "name": "unique_secret_code", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - } - }, - "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_permissions": { - "name": "staff_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "permission_name": { - "name": "permission_name", - "type": "staff_permission", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_permission_name": { - "name": "unique_permission_name", - "nullsNotDistinct": false, - "columns": [ - "permission_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_role_permissions": { - "name": "staff_role_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_role_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "staff_permission_id": { - "name": "staff_permission_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_role_permissions_staff_role_id_staff_roles_id_fk": { - "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": { - "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_permissions", - "schemaTo": "mf", - "columnsFrom": [ - "staff_permission_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_permission": { - "name": "unique_role_permission", - "nullsNotDistinct": false, - "columns": [ - "staff_role_id", - "staff_permission_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_roles": { - "name": "staff_roles", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_roles_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "role_name": { - "name": "role_name", - "type": "staff_role", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_name": { - "name": "unique_role_name", - "nullsNotDistinct": false, - "columns": [ - "role_name" - ] - } - }, - "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 - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_users_staff_role_id_staff_roles_id_fk": { - "name": "staff_users_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_users", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "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 - }, - "image_url": { - "name": "image_url", - "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.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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": false - }, - "is_permanent": { - "name": "is_permanent", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "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" - ] - }, - "public.staff_permission": { - "name": "staff_permission", - "schema": "public", - "values": [ - "crud_product", - "make_coupon", - "crud_staff_users" - ] - }, - "public.staff_role": { - "name": "staff_role", - "schema": "public", - "values": [ - "super_admin", - "admin", - "marketer", - "delivery_staff" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0069_snapshot.json b/apps/backend/drizzle/meta/0069_snapshot.json deleted file mode 100644 index efdb65c..0000000 --- a/apps/backend/drizzle/meta/0069_snapshot.json +++ /dev/null @@ -1,3618 +0,0 @@ -{ - "id": "63877efe-271a-44e7-a95f-83421f37376d", - "prevId": "9e107cf4-10af-409c-b465-73740ca869e1", - "version": "7", - "dialect": "postgresql", - "tables": { - "mf.address_areas": { - "name": "address_areas", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_areas_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "place_name": { - "name": "place_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "address_areas_zone_id_address_zones_id_fk": { - "name": "address_areas_zone_id_address_zones_id_fk", - "tableFrom": "address_areas", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.address_zones": { - "name": "address_zones", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_zones_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "zone_name": { - "name": "zone_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "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 - }, - "google_maps_url": { - "name": "google_maps_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "admin_latitude": { - "name": "admin_latitude", - "type": "real", - "primaryKey": false, - "notNull": false - }, - "admin_longitude": { - "name": "admin_longitude", - "type": "real", - "primaryKey": false, - "notNull": false - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "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" - }, - "addresses_zone_id_address_zones_id_fk": { - "name": "addresses_zone_id_address_zones_id_fk", - "tableFrom": "addresses", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_by": { - "name": "created_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "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 - }, - "is_flash": { - "name": "is_flash", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "delivery_sequence": { - "name": "delivery_sequence", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.home_banners": { - "name": "home_banners", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "home_banners_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 - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "product_ids": { - "name": "product_ids", - "type": "integer[]", - "primaryKey": false, - "notNull": false - }, - "redirect_url": { - "name": "redirect_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "serial_num": { - "name": "serial_num", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "is_active": { - "name": "is_active", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_updated": { - "name": "last_updated", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "is_packaged": { - "name": "is_packaged", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_package_verified": { - "name": "is_package_verified", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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 - }, - "is_cancelled_by_admin": { - "name": "is_cancelled_by_admin", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "payment_state": { - "name": "payment_state", - "type": "payment_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "delivery_charge": { - "name": "delivery_charge", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true, - "default": "'0'" - }, - "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 - }, - "order_group_id": { - "name": "order_group_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "order_group_proportion": { - "name": "order_group_proportion", - "type": "numeric(10, 4)", - "primaryKey": false, - "notNull": false - }, - "is_flash_delivery": { - "name": "is_flash_delivery", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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_group_info": { - "name": "product_group_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_group_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "group_name": { - "name": "group_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()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_group_membership": { - "name": "product_group_membership", - "schema": "mf", - "columns": { - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "group_id": { - "name": "group_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_group_membership_product_id_product_info_id_fk": { - "name": "product_group_membership_product_id_product_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_group_membership_group_id_product_group_info_id_fk": { - "name": "product_group_membership_group_id_product_group_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_group_info", - "schemaTo": "mf", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_group_membership_pk": { - "name": "product_group_membership_pk", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "group_id" - ] - } - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_flash_available": { - "name": "is_flash_available", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "flash_price": { - "name": "flash_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "increment_step": { - "name": "increment_step", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "product_quantity": { - "name": "product_quantity", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "store_id": { - "name": "store_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.reserved_coupons": { - "name": "reserved_coupons", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "reserved_coupons_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "secret_code": { - "name": "secret_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "coupon_code": { - "name": "coupon_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "max_value": { - "name": "max_value", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": 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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_redeemed": { - "name": "is_redeemed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "redeemed_by": { - "name": "redeemed_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "redeemed_at": { - "name": "redeemed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_by": { - "name": "created_by", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "reserved_coupons_redeemed_by_users_id_fk": { - "name": "reserved_coupons_redeemed_by_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "redeemed_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "reserved_coupons_created_by_staff_users_id_fk": { - "name": "reserved_coupons_created_by_staff_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "staff_users", - "schemaTo": "mf", - "columnsFrom": [ - "created_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reserved_coupons_secret_code_unique": { - "name": "reserved_coupons_secret_code_unique", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - }, - "unique_secret_code": { - "name": "unique_secret_code", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - } - }, - "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_permissions": { - "name": "staff_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "permission_name": { - "name": "permission_name", - "type": "staff_permission", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_permission_name": { - "name": "unique_permission_name", - "nullsNotDistinct": false, - "columns": [ - "permission_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_role_permissions": { - "name": "staff_role_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_role_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "staff_permission_id": { - "name": "staff_permission_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_role_permissions_staff_role_id_staff_roles_id_fk": { - "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": { - "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_permissions", - "schemaTo": "mf", - "columnsFrom": [ - "staff_permission_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_permission": { - "name": "unique_role_permission", - "nullsNotDistinct": false, - "columns": [ - "staff_role_id", - "staff_permission_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_roles": { - "name": "staff_roles", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_roles_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "role_name": { - "name": "role_name", - "type": "staff_role", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_name": { - "name": "unique_role_name", - "nullsNotDistinct": false, - "columns": [ - "role_name" - ] - } - }, - "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 - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_users_staff_role_id_staff_roles_id_fk": { - "name": "staff_users_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_users", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "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 - }, - "image_url": { - "name": "image_url", - "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.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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": false - }, - "is_permanent": { - "name": "is_permanent", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "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" - ] - }, - "public.staff_permission": { - "name": "staff_permission", - "schema": "public", - "values": [ - "crud_product", - "make_coupon", - "crud_staff_users" - ] - }, - "public.staff_role": { - "name": "staff_role", - "schema": "public", - "values": [ - "super_admin", - "admin", - "marketer", - "delivery_staff" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0070_snapshot.json b/apps/backend/drizzle/meta/0070_snapshot.json deleted file mode 100644 index 23df017..0000000 --- a/apps/backend/drizzle/meta/0070_snapshot.json +++ /dev/null @@ -1,3624 +0,0 @@ -{ - "id": "7c9cf543-7cef-43e5-801d-8b24eaf66e84", - "prevId": "63877efe-271a-44e7-a95f-83421f37376d", - "version": "7", - "dialect": "postgresql", - "tables": { - "mf.address_areas": { - "name": "address_areas", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_areas_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "place_name": { - "name": "place_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "address_areas_zone_id_address_zones_id_fk": { - "name": "address_areas_zone_id_address_zones_id_fk", - "tableFrom": "address_areas", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.address_zones": { - "name": "address_zones", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_zones_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "zone_name": { - "name": "zone_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "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 - }, - "google_maps_url": { - "name": "google_maps_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "admin_latitude": { - "name": "admin_latitude", - "type": "real", - "primaryKey": false, - "notNull": false - }, - "admin_longitude": { - "name": "admin_longitude", - "type": "real", - "primaryKey": false, - "notNull": false - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "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" - }, - "addresses_zone_id_address_zones_id_fk": { - "name": "addresses_zone_id_address_zones_id_fk", - "tableFrom": "addresses", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_by": { - "name": "created_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "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 - }, - "is_flash": { - "name": "is_flash", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "delivery_sequence": { - "name": "delivery_sequence", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "group_ids": { - "name": "group_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.home_banners": { - "name": "home_banners", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "home_banners_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 - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "product_ids": { - "name": "product_ids", - "type": "integer[]", - "primaryKey": false, - "notNull": false - }, - "redirect_url": { - "name": "redirect_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "serial_num": { - "name": "serial_num", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "is_active": { - "name": "is_active", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_updated": { - "name": "last_updated", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "is_packaged": { - "name": "is_packaged", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_package_verified": { - "name": "is_package_verified", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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 - }, - "is_cancelled_by_admin": { - "name": "is_cancelled_by_admin", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "payment_state": { - "name": "payment_state", - "type": "payment_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "delivery_charge": { - "name": "delivery_charge", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true, - "default": "'0'" - }, - "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 - }, - "order_group_id": { - "name": "order_group_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "order_group_proportion": { - "name": "order_group_proportion", - "type": "numeric(10, 4)", - "primaryKey": false, - "notNull": false - }, - "is_flash_delivery": { - "name": "is_flash_delivery", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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_group_info": { - "name": "product_group_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_group_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "group_name": { - "name": "group_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()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_group_membership": { - "name": "product_group_membership", - "schema": "mf", - "columns": { - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "group_id": { - "name": "group_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_group_membership_product_id_product_info_id_fk": { - "name": "product_group_membership_product_id_product_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_group_membership_group_id_product_group_info_id_fk": { - "name": "product_group_membership_group_id_product_group_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_group_info", - "schemaTo": "mf", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_group_membership_pk": { - "name": "product_group_membership_pk", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "group_id" - ] - } - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_flash_available": { - "name": "is_flash_available", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "flash_price": { - "name": "flash_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "increment_step": { - "name": "increment_step", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "product_quantity": { - "name": "product_quantity", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "store_id": { - "name": "store_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.reserved_coupons": { - "name": "reserved_coupons", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "reserved_coupons_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "secret_code": { - "name": "secret_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "coupon_code": { - "name": "coupon_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "max_value": { - "name": "max_value", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": 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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_redeemed": { - "name": "is_redeemed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "redeemed_by": { - "name": "redeemed_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "redeemed_at": { - "name": "redeemed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_by": { - "name": "created_by", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "reserved_coupons_redeemed_by_users_id_fk": { - "name": "reserved_coupons_redeemed_by_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "redeemed_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "reserved_coupons_created_by_staff_users_id_fk": { - "name": "reserved_coupons_created_by_staff_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "staff_users", - "schemaTo": "mf", - "columnsFrom": [ - "created_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reserved_coupons_secret_code_unique": { - "name": "reserved_coupons_secret_code_unique", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - }, - "unique_secret_code": { - "name": "unique_secret_code", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - } - }, - "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_permissions": { - "name": "staff_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "permission_name": { - "name": "permission_name", - "type": "staff_permission", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_permission_name": { - "name": "unique_permission_name", - "nullsNotDistinct": false, - "columns": [ - "permission_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_role_permissions": { - "name": "staff_role_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_role_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "staff_permission_id": { - "name": "staff_permission_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_role_permissions_staff_role_id_staff_roles_id_fk": { - "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": { - "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_permissions", - "schemaTo": "mf", - "columnsFrom": [ - "staff_permission_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_permission": { - "name": "unique_role_permission", - "nullsNotDistinct": false, - "columns": [ - "staff_role_id", - "staff_permission_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_roles": { - "name": "staff_roles", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_roles_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "role_name": { - "name": "role_name", - "type": "staff_role", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_name": { - "name": "unique_role_name", - "nullsNotDistinct": false, - "columns": [ - "role_name" - ] - } - }, - "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 - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_users_staff_role_id_staff_roles_id_fk": { - "name": "staff_users_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_users", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "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 - }, - "image_url": { - "name": "image_url", - "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.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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": false - }, - "is_permanent": { - "name": "is_permanent", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "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" - ] - }, - "public.staff_permission": { - "name": "staff_permission", - "schema": "public", - "values": [ - "crud_product", - "make_coupon", - "crud_staff_users" - ] - }, - "public.staff_role": { - "name": "staff_role", - "schema": "public", - "values": [ - "super_admin", - "admin", - "marketer", - "delivery_staff" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0071_snapshot.json b/apps/backend/drizzle/meta/0071_snapshot.json deleted file mode 100644 index 0194fa6..0000000 --- a/apps/backend/drizzle/meta/0071_snapshot.json +++ /dev/null @@ -1,3630 +0,0 @@ -{ - "id": "959eafae-508f-41d7-8086-b195fce9bcec", - "prevId": "7c9cf543-7cef-43e5-801d-8b24eaf66e84", - "version": "7", - "dialect": "postgresql", - "tables": { - "mf.address_areas": { - "name": "address_areas", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_areas_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "place_name": { - "name": "place_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "address_areas_zone_id_address_zones_id_fk": { - "name": "address_areas_zone_id_address_zones_id_fk", - "tableFrom": "address_areas", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.address_zones": { - "name": "address_zones", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_zones_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "zone_name": { - "name": "zone_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "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 - }, - "google_maps_url": { - "name": "google_maps_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "admin_latitude": { - "name": "admin_latitude", - "type": "real", - "primaryKey": false, - "notNull": false - }, - "admin_longitude": { - "name": "admin_longitude", - "type": "real", - "primaryKey": false, - "notNull": false - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "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" - }, - "addresses_zone_id_address_zones_id_fk": { - "name": "addresses_zone_id_address_zones_id_fk", - "tableFrom": "addresses", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_by": { - "name": "created_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "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 - }, - "is_flash": { - "name": "is_flash", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "delivery_sequence": { - "name": "delivery_sequence", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "group_ids": { - "name": "group_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.home_banners": { - "name": "home_banners", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "home_banners_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 - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "product_ids": { - "name": "product_ids", - "type": "integer[]", - "primaryKey": false, - "notNull": false - }, - "redirect_url": { - "name": "redirect_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "serial_num": { - "name": "serial_num", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "is_active": { - "name": "is_active", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_updated": { - "name": "last_updated", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "is_packaged": { - "name": "is_packaged", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_package_verified": { - "name": "is_package_verified", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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 - }, - "is_cancelled_by_admin": { - "name": "is_cancelled_by_admin", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "payment_state": { - "name": "payment_state", - "type": "payment_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "delivery_charge": { - "name": "delivery_charge", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true, - "default": "'0'" - }, - "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 - }, - "order_group_id": { - "name": "order_group_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "order_group_proportion": { - "name": "order_group_proportion", - "type": "numeric(10, 4)", - "primaryKey": false, - "notNull": false - }, - "is_flash_delivery": { - "name": "is_flash_delivery", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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_group_info": { - "name": "product_group_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_group_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "group_name": { - "name": "group_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()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_group_membership": { - "name": "product_group_membership", - "schema": "mf", - "columns": { - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "group_id": { - "name": "group_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_group_membership_product_id_product_info_id_fk": { - "name": "product_group_membership_product_id_product_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_group_membership_group_id_product_group_info_id_fk": { - "name": "product_group_membership_group_id_product_group_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_group_info", - "schemaTo": "mf", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_group_membership_pk": { - "name": "product_group_membership_pk", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "group_id" - ] - } - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_flash_available": { - "name": "is_flash_available", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "flash_price": { - "name": "flash_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "increment_step": { - "name": "increment_step", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "product_quantity": { - "name": "product_quantity", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "store_id": { - "name": "store_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "related_stores": { - "name": "related_stores", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.reserved_coupons": { - "name": "reserved_coupons", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "reserved_coupons_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "secret_code": { - "name": "secret_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "coupon_code": { - "name": "coupon_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "max_value": { - "name": "max_value", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": 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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_redeemed": { - "name": "is_redeemed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "redeemed_by": { - "name": "redeemed_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "redeemed_at": { - "name": "redeemed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_by": { - "name": "created_by", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "reserved_coupons_redeemed_by_users_id_fk": { - "name": "reserved_coupons_redeemed_by_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "redeemed_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "reserved_coupons_created_by_staff_users_id_fk": { - "name": "reserved_coupons_created_by_staff_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "staff_users", - "schemaTo": "mf", - "columnsFrom": [ - "created_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reserved_coupons_secret_code_unique": { - "name": "reserved_coupons_secret_code_unique", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - }, - "unique_secret_code": { - "name": "unique_secret_code", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - } - }, - "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_permissions": { - "name": "staff_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "permission_name": { - "name": "permission_name", - "type": "staff_permission", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_permission_name": { - "name": "unique_permission_name", - "nullsNotDistinct": false, - "columns": [ - "permission_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_role_permissions": { - "name": "staff_role_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_role_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "staff_permission_id": { - "name": "staff_permission_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_role_permissions_staff_role_id_staff_roles_id_fk": { - "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": { - "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_permissions", - "schemaTo": "mf", - "columnsFrom": [ - "staff_permission_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_permission": { - "name": "unique_role_permission", - "nullsNotDistinct": false, - "columns": [ - "staff_role_id", - "staff_permission_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_roles": { - "name": "staff_roles", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_roles_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "role_name": { - "name": "role_name", - "type": "staff_role", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_name": { - "name": "unique_role_name", - "nullsNotDistinct": false, - "columns": [ - "role_name" - ] - } - }, - "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 - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_users_staff_role_id_staff_roles_id_fk": { - "name": "staff_users_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_users", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "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 - }, - "image_url": { - "name": "image_url", - "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.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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": false - }, - "is_permanent": { - "name": "is_permanent", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "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" - ] - }, - "public.staff_permission": { - "name": "staff_permission", - "schema": "public", - "values": [ - "crud_product", - "make_coupon", - "crud_staff_users" - ] - }, - "public.staff_role": { - "name": "staff_role", - "schema": "public", - "values": [ - "super_admin", - "admin", - "marketer", - "delivery_staff" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0072_snapshot.json b/apps/backend/drizzle/meta/0072_snapshot.json deleted file mode 100644 index 57403bb..0000000 --- a/apps/backend/drizzle/meta/0072_snapshot.json +++ /dev/null @@ -1,3685 +0,0 @@ -{ - "id": "66373351-55c5-4990-bb31-8dd9bf22016c", - "prevId": "959eafae-508f-41d7-8086-b195fce9bcec", - "version": "7", - "dialect": "postgresql", - "tables": { - "mf.address_areas": { - "name": "address_areas", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_areas_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "place_name": { - "name": "place_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "address_areas_zone_id_address_zones_id_fk": { - "name": "address_areas_zone_id_address_zones_id_fk", - "tableFrom": "address_areas", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.address_zones": { - "name": "address_zones", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_zones_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "zone_name": { - "name": "zone_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "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 - }, - "google_maps_url": { - "name": "google_maps_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "admin_latitude": { - "name": "admin_latitude", - "type": "real", - "primaryKey": false, - "notNull": false - }, - "admin_longitude": { - "name": "admin_longitude", - "type": "real", - "primaryKey": false, - "notNull": false - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "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" - }, - "addresses_zone_id_address_zones_id_fk": { - "name": "addresses_zone_id_address_zones_id_fk", - "tableFrom": "addresses", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_by": { - "name": "created_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "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 - }, - "is_flash": { - "name": "is_flash", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "delivery_sequence": { - "name": "delivery_sequence", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "group_ids": { - "name": "group_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.home_banners": { - "name": "home_banners", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "home_banners_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 - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "product_ids": { - "name": "product_ids", - "type": "integer[]", - "primaryKey": false, - "notNull": false - }, - "redirect_url": { - "name": "redirect_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "serial_num": { - "name": "serial_num", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "is_active": { - "name": "is_active", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_updated": { - "name": "last_updated", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "is_packaged": { - "name": "is_packaged", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_package_verified": { - "name": "is_package_verified", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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 - }, - "is_cancelled_by_admin": { - "name": "is_cancelled_by_admin", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "payment_state": { - "name": "payment_state", - "type": "payment_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "delivery_charge": { - "name": "delivery_charge", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true, - "default": "'0'" - }, - "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 - }, - "order_group_id": { - "name": "order_group_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "order_group_proportion": { - "name": "order_group_proportion", - "type": "numeric(10, 4)", - "primaryKey": false, - "notNull": false - }, - "is_flash_delivery": { - "name": "is_flash_delivery", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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_group_info": { - "name": "product_group_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_group_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "group_name": { - "name": "group_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()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_group_membership": { - "name": "product_group_membership", - "schema": "mf", - "columns": { - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "group_id": { - "name": "group_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_group_membership_product_id_product_info_id_fk": { - "name": "product_group_membership_product_id_product_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_group_membership_group_id_product_group_info_id_fk": { - "name": "product_group_membership_group_id_product_group_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_group_info", - "schemaTo": "mf", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_group_membership_pk": { - "name": "product_group_membership_pk", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "group_id" - ] - } - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_flash_available": { - "name": "is_flash_available", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "flash_price": { - "name": "flash_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "increment_step": { - "name": "increment_step", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "product_quantity": { - "name": "product_quantity", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "store_id": { - "name": "store_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "related_stores": { - "name": "related_stores", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.reserved_coupons": { - "name": "reserved_coupons", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "reserved_coupons_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "secret_code": { - "name": "secret_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "coupon_code": { - "name": "coupon_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "max_value": { - "name": "max_value", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": 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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_redeemed": { - "name": "is_redeemed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "redeemed_by": { - "name": "redeemed_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "redeemed_at": { - "name": "redeemed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_by": { - "name": "created_by", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "reserved_coupons_redeemed_by_users_id_fk": { - "name": "reserved_coupons_redeemed_by_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "redeemed_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "reserved_coupons_created_by_staff_users_id_fk": { - "name": "reserved_coupons_created_by_staff_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "staff_users", - "schemaTo": "mf", - "columnsFrom": [ - "created_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reserved_coupons_secret_code_unique": { - "name": "reserved_coupons_secret_code_unique", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - }, - "unique_secret_code": { - "name": "unique_secret_code", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - } - }, - "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_permissions": { - "name": "staff_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "permission_name": { - "name": "permission_name", - "type": "staff_permission", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_permission_name": { - "name": "unique_permission_name", - "nullsNotDistinct": false, - "columns": [ - "permission_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_role_permissions": { - "name": "staff_role_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_role_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "staff_permission_id": { - "name": "staff_permission_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_role_permissions_staff_role_id_staff_roles_id_fk": { - "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": { - "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_permissions", - "schemaTo": "mf", - "columnsFrom": [ - "staff_permission_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_permission": { - "name": "unique_role_permission", - "nullsNotDistinct": false, - "columns": [ - "staff_role_id", - "staff_permission_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_roles": { - "name": "staff_roles", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_roles_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "role_name": { - "name": "role_name", - "type": "staff_role", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_name": { - "name": "unique_role_name", - "nullsNotDistinct": false, - "columns": [ - "role_name" - ] - } - }, - "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 - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_users_staff_role_id_staff_roles_id_fk": { - "name": "staff_users_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_users", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "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 - }, - "image_url": { - "name": "image_url", - "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.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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.user_notifications": { - "name": "user_notifications", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "user_notifications_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "body": { - "name": "body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "applicable_users": { - "name": "applicable_users", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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": false - }, - "is_permanent": { - "name": "is_permanent", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "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" - ] - }, - "public.staff_permission": { - "name": "staff_permission", - "schema": "public", - "values": [ - "crud_product", - "make_coupon", - "crud_staff_users" - ] - }, - "public.staff_role": { - "name": "staff_role", - "schema": "public", - "values": [ - "super_admin", - "admin", - "marketer", - "delivery_staff" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0073_snapshot.json b/apps/backend/drizzle/meta/0073_snapshot.json deleted file mode 100644 index 1d50238..0000000 --- a/apps/backend/drizzle/meta/0073_snapshot.json +++ /dev/null @@ -1,3691 +0,0 @@ -{ - "id": "96b766f9-646c-4a90-a1b0-19a01fc1188c", - "prevId": "66373351-55c5-4990-bb31-8dd9bf22016c", - "version": "7", - "dialect": "postgresql", - "tables": { - "mf.address_areas": { - "name": "address_areas", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_areas_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "place_name": { - "name": "place_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "address_areas_zone_id_address_zones_id_fk": { - "name": "address_areas_zone_id_address_zones_id_fk", - "tableFrom": "address_areas", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.address_zones": { - "name": "address_zones", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_zones_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "zone_name": { - "name": "zone_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "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 - }, - "google_maps_url": { - "name": "google_maps_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "admin_latitude": { - "name": "admin_latitude", - "type": "real", - "primaryKey": false, - "notNull": false - }, - "admin_longitude": { - "name": "admin_longitude", - "type": "real", - "primaryKey": false, - "notNull": false - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "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" - }, - "addresses_zone_id_address_zones_id_fk": { - "name": "addresses_zone_id_address_zones_id_fk", - "tableFrom": "addresses", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_by": { - "name": "created_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "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 - }, - "is_flash": { - "name": "is_flash", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "delivery_sequence": { - "name": "delivery_sequence", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "group_ids": { - "name": "group_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.home_banners": { - "name": "home_banners", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "home_banners_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 - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "product_ids": { - "name": "product_ids", - "type": "integer[]", - "primaryKey": false, - "notNull": false - }, - "redirect_url": { - "name": "redirect_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "serial_num": { - "name": "serial_num", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "is_active": { - "name": "is_active", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_updated": { - "name": "last_updated", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "is_packaged": { - "name": "is_packaged", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_package_verified": { - "name": "is_package_verified", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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 - }, - "is_cancelled_by_admin": { - "name": "is_cancelled_by_admin", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "payment_state": { - "name": "payment_state", - "type": "payment_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "delivery_charge": { - "name": "delivery_charge", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true, - "default": "'0'" - }, - "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 - }, - "order_group_id": { - "name": "order_group_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "order_group_proportion": { - "name": "order_group_proportion", - "type": "numeric(10, 4)", - "primaryKey": false, - "notNull": false - }, - "is_flash_delivery": { - "name": "is_flash_delivery", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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_group_info": { - "name": "product_group_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_group_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "group_name": { - "name": "group_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()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_group_membership": { - "name": "product_group_membership", - "schema": "mf", - "columns": { - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "group_id": { - "name": "group_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_group_membership_product_id_product_info_id_fk": { - "name": "product_group_membership_product_id_product_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_group_membership_group_id_product_group_info_id_fk": { - "name": "product_group_membership_group_id_product_group_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_group_info", - "schemaTo": "mf", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_group_membership_pk": { - "name": "product_group_membership_pk", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "group_id" - ] - } - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_flash_available": { - "name": "is_flash_available", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "flash_price": { - "name": "flash_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "increment_step": { - "name": "increment_step", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "product_quantity": { - "name": "product_quantity", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "store_id": { - "name": "store_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "related_stores": { - "name": "related_stores", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.reserved_coupons": { - "name": "reserved_coupons", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "reserved_coupons_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "secret_code": { - "name": "secret_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "coupon_code": { - "name": "coupon_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "max_value": { - "name": "max_value", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": 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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_redeemed": { - "name": "is_redeemed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "redeemed_by": { - "name": "redeemed_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "redeemed_at": { - "name": "redeemed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_by": { - "name": "created_by", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "reserved_coupons_redeemed_by_users_id_fk": { - "name": "reserved_coupons_redeemed_by_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "redeemed_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "reserved_coupons_created_by_staff_users_id_fk": { - "name": "reserved_coupons_created_by_staff_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "staff_users", - "schemaTo": "mf", - "columnsFrom": [ - "created_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reserved_coupons_secret_code_unique": { - "name": "reserved_coupons_secret_code_unique", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - }, - "unique_secret_code": { - "name": "unique_secret_code", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - } - }, - "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_permissions": { - "name": "staff_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "permission_name": { - "name": "permission_name", - "type": "staff_permission", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_permission_name": { - "name": "unique_permission_name", - "nullsNotDistinct": false, - "columns": [ - "permission_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_role_permissions": { - "name": "staff_role_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_role_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "staff_permission_id": { - "name": "staff_permission_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_role_permissions_staff_role_id_staff_roles_id_fk": { - "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": { - "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_permissions", - "schemaTo": "mf", - "columnsFrom": [ - "staff_permission_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_permission": { - "name": "unique_role_permission", - "nullsNotDistinct": false, - "columns": [ - "staff_role_id", - "staff_permission_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_roles": { - "name": "staff_roles", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_roles_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "role_name": { - "name": "role_name", - "type": "staff_role", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_name": { - "name": "unique_role_name", - "nullsNotDistinct": false, - "columns": [ - "role_name" - ] - } - }, - "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 - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_users_staff_role_id_staff_roles_id_fk": { - "name": "staff_users_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_users", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "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 - }, - "image_url": { - "name": "image_url", - "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.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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.user_notifications": { - "name": "user_notifications", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "user_notifications_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "title": { - "name": "title", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "body": { - "name": "body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "applicable_users": { - "name": "applicable_users", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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": false - }, - "is_permanent": { - "name": "is_permanent", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "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" - ] - }, - "public.staff_permission": { - "name": "staff_permission", - "schema": "public", - "values": [ - "crud_product", - "make_coupon", - "crud_staff_users" - ] - }, - "public.staff_role": { - "name": "staff_role", - "schema": "public", - "values": [ - "super_admin", - "admin", - "marketer", - "delivery_staff" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0074_snapshot.json b/apps/backend/drizzle/meta/0074_snapshot.json deleted file mode 100644 index 19b344c..0000000 --- a/apps/backend/drizzle/meta/0074_snapshot.json +++ /dev/null @@ -1,3698 +0,0 @@ -{ - "id": "d5792792-dff1-4dbc-97e8-ca51c413ce24", - "prevId": "96b766f9-646c-4a90-a1b0-19a01fc1188c", - "version": "7", - "dialect": "postgresql", - "tables": { - "mf.address_areas": { - "name": "address_areas", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_areas_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "place_name": { - "name": "place_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "address_areas_zone_id_address_zones_id_fk": { - "name": "address_areas_zone_id_address_zones_id_fk", - "tableFrom": "address_areas", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.address_zones": { - "name": "address_zones", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_zones_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "zone_name": { - "name": "zone_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "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 - }, - "google_maps_url": { - "name": "google_maps_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "admin_latitude": { - "name": "admin_latitude", - "type": "real", - "primaryKey": false, - "notNull": false - }, - "admin_longitude": { - "name": "admin_longitude", - "type": "real", - "primaryKey": false, - "notNull": false - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "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" - }, - "addresses_zone_id_address_zones_id_fk": { - "name": "addresses_zone_id_address_zones_id_fk", - "tableFrom": "addresses", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_by": { - "name": "created_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "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 - }, - "is_flash": { - "name": "is_flash", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_capacity_full": { - "name": "is_capacity_full", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "delivery_sequence": { - "name": "delivery_sequence", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "group_ids": { - "name": "group_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.home_banners": { - "name": "home_banners", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "home_banners_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 - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "product_ids": { - "name": "product_ids", - "type": "integer[]", - "primaryKey": false, - "notNull": false - }, - "redirect_url": { - "name": "redirect_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "serial_num": { - "name": "serial_num", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "is_active": { - "name": "is_active", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_updated": { - "name": "last_updated", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "is_packaged": { - "name": "is_packaged", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_package_verified": { - "name": "is_package_verified", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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 - }, - "is_cancelled_by_admin": { - "name": "is_cancelled_by_admin", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "payment_state": { - "name": "payment_state", - "type": "payment_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "delivery_charge": { - "name": "delivery_charge", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true, - "default": "'0'" - }, - "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 - }, - "order_group_id": { - "name": "order_group_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "order_group_proportion": { - "name": "order_group_proportion", - "type": "numeric(10, 4)", - "primaryKey": false, - "notNull": false - }, - "is_flash_delivery": { - "name": "is_flash_delivery", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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_group_info": { - "name": "product_group_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_group_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "group_name": { - "name": "group_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()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_group_membership": { - "name": "product_group_membership", - "schema": "mf", - "columns": { - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "group_id": { - "name": "group_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_group_membership_product_id_product_info_id_fk": { - "name": "product_group_membership_product_id_product_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_group_membership_group_id_product_group_info_id_fk": { - "name": "product_group_membership_group_id_product_group_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_group_info", - "schemaTo": "mf", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_group_membership_pk": { - "name": "product_group_membership_pk", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "group_id" - ] - } - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_flash_available": { - "name": "is_flash_available", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "flash_price": { - "name": "flash_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "increment_step": { - "name": "increment_step", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "product_quantity": { - "name": "product_quantity", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "store_id": { - "name": "store_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "related_stores": { - "name": "related_stores", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.reserved_coupons": { - "name": "reserved_coupons", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "reserved_coupons_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "secret_code": { - "name": "secret_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "coupon_code": { - "name": "coupon_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "max_value": { - "name": "max_value", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": 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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_redeemed": { - "name": "is_redeemed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "redeemed_by": { - "name": "redeemed_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "redeemed_at": { - "name": "redeemed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_by": { - "name": "created_by", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "reserved_coupons_redeemed_by_users_id_fk": { - "name": "reserved_coupons_redeemed_by_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "redeemed_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "reserved_coupons_created_by_staff_users_id_fk": { - "name": "reserved_coupons_created_by_staff_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "staff_users", - "schemaTo": "mf", - "columnsFrom": [ - "created_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reserved_coupons_secret_code_unique": { - "name": "reserved_coupons_secret_code_unique", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - }, - "unique_secret_code": { - "name": "unique_secret_code", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - } - }, - "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_permissions": { - "name": "staff_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "permission_name": { - "name": "permission_name", - "type": "staff_permission", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_permission_name": { - "name": "unique_permission_name", - "nullsNotDistinct": false, - "columns": [ - "permission_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_role_permissions": { - "name": "staff_role_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_role_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "staff_permission_id": { - "name": "staff_permission_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_role_permissions_staff_role_id_staff_roles_id_fk": { - "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": { - "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_permissions", - "schemaTo": "mf", - "columnsFrom": [ - "staff_permission_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_permission": { - "name": "unique_role_permission", - "nullsNotDistinct": false, - "columns": [ - "staff_role_id", - "staff_permission_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_roles": { - "name": "staff_roles", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_roles_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "role_name": { - "name": "role_name", - "type": "staff_role", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_name": { - "name": "unique_role_name", - "nullsNotDistinct": false, - "columns": [ - "role_name" - ] - } - }, - "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 - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_users_staff_role_id_staff_roles_id_fk": { - "name": "staff_users_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_users", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "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 - }, - "image_url": { - "name": "image_url", - "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.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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.user_notifications": { - "name": "user_notifications", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "user_notifications_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "title": { - "name": "title", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "body": { - "name": "body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "applicable_users": { - "name": "applicable_users", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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": false - }, - "is_permanent": { - "name": "is_permanent", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "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" - ] - }, - "public.staff_permission": { - "name": "staff_permission", - "schema": "public", - "values": [ - "crud_product", - "make_coupon", - "crud_staff_users" - ] - }, - "public.staff_role": { - "name": "staff_role", - "schema": "public", - "values": [ - "super_admin", - "admin", - "marketer", - "delivery_staff" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0075_snapshot.json b/apps/backend/drizzle/meta/0075_snapshot.json deleted file mode 100644 index e07c081..0000000 --- a/apps/backend/drizzle/meta/0075_snapshot.json +++ /dev/null @@ -1,3755 +0,0 @@ -{ - "id": "327cc259-efc0-44ff-b581-2dd28869acdb", - "prevId": "d5792792-dff1-4dbc-97e8-ca51c413ce24", - "version": "7", - "dialect": "postgresql", - "tables": { - "mf.address_areas": { - "name": "address_areas", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_areas_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "place_name": { - "name": "place_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "address_areas_zone_id_address_zones_id_fk": { - "name": "address_areas_zone_id_address_zones_id_fk", - "tableFrom": "address_areas", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.address_zones": { - "name": "address_zones", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_zones_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "zone_name": { - "name": "zone_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "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 - }, - "google_maps_url": { - "name": "google_maps_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "admin_latitude": { - "name": "admin_latitude", - "type": "real", - "primaryKey": false, - "notNull": false - }, - "admin_longitude": { - "name": "admin_longitude", - "type": "real", - "primaryKey": false, - "notNull": false - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "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" - }, - "addresses_zone_id_address_zones_id_fk": { - "name": "addresses_zone_id_address_zones_id_fk", - "tableFrom": "addresses", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_by": { - "name": "created_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "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 - }, - "is_flash": { - "name": "is_flash", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_capacity_full": { - "name": "is_capacity_full", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "delivery_sequence": { - "name": "delivery_sequence", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "group_ids": { - "name": "group_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.home_banners": { - "name": "home_banners", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "home_banners_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 - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "product_ids": { - "name": "product_ids", - "type": "integer[]", - "primaryKey": false, - "notNull": false - }, - "redirect_url": { - "name": "redirect_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "serial_num": { - "name": "serial_num", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "is_active": { - "name": "is_active", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_updated": { - "name": "last_updated", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "is_packaged": { - "name": "is_packaged", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_package_verified": { - "name": "is_package_verified", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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 - }, - "is_cancelled_by_admin": { - "name": "is_cancelled_by_admin", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "payment_state": { - "name": "payment_state", - "type": "payment_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "delivery_charge": { - "name": "delivery_charge", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true, - "default": "'0'" - }, - "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 - }, - "order_group_id": { - "name": "order_group_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "order_group_proportion": { - "name": "order_group_proportion", - "type": "numeric(10, 4)", - "primaryKey": false, - "notNull": false - }, - "is_flash_delivery": { - "name": "is_flash_delivery", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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_group_info": { - "name": "product_group_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_group_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "group_name": { - "name": "group_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()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_group_membership": { - "name": "product_group_membership", - "schema": "mf", - "columns": { - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "group_id": { - "name": "group_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_group_membership_product_id_product_info_id_fk": { - "name": "product_group_membership_product_id_product_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_group_membership_group_id_product_group_info_id_fk": { - "name": "product_group_membership_group_id_product_group_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_group_info", - "schemaTo": "mf", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_group_membership_pk": { - "name": "product_group_membership_pk", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "group_id" - ] - } - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_flash_available": { - "name": "is_flash_available", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "flash_price": { - "name": "flash_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "increment_step": { - "name": "increment_step", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "product_quantity": { - "name": "product_quantity", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "store_id": { - "name": "store_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "related_stores": { - "name": "related_stores", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.reserved_coupons": { - "name": "reserved_coupons", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "reserved_coupons_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "secret_code": { - "name": "secret_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "coupon_code": { - "name": "coupon_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "max_value": { - "name": "max_value", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": 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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_redeemed": { - "name": "is_redeemed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "redeemed_by": { - "name": "redeemed_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "redeemed_at": { - "name": "redeemed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_by": { - "name": "created_by", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "reserved_coupons_redeemed_by_users_id_fk": { - "name": "reserved_coupons_redeemed_by_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "redeemed_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "reserved_coupons_created_by_staff_users_id_fk": { - "name": "reserved_coupons_created_by_staff_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "staff_users", - "schemaTo": "mf", - "columnsFrom": [ - "created_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reserved_coupons_secret_code_unique": { - "name": "reserved_coupons_secret_code_unique", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - }, - "unique_secret_code": { - "name": "unique_secret_code", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - } - }, - "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_permissions": { - "name": "staff_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "permission_name": { - "name": "permission_name", - "type": "staff_permission", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_permission_name": { - "name": "unique_permission_name", - "nullsNotDistinct": false, - "columns": [ - "permission_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_role_permissions": { - "name": "staff_role_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_role_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "staff_permission_id": { - "name": "staff_permission_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_role_permissions_staff_role_id_staff_roles_id_fk": { - "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": { - "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_permissions", - "schemaTo": "mf", - "columnsFrom": [ - "staff_permission_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_permission": { - "name": "unique_role_permission", - "nullsNotDistinct": false, - "columns": [ - "staff_role_id", - "staff_permission_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_roles": { - "name": "staff_roles", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_roles_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "role_name": { - "name": "role_name", - "type": "staff_role", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_name": { - "name": "unique_role_name", - "nullsNotDistinct": false, - "columns": [ - "role_name" - ] - } - }, - "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 - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_users_staff_role_id_staff_roles_id_fk": { - "name": "staff_users_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_users", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "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 - }, - "image_url": { - "name": "image_url", - "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.unlogged_user_tokens": { - "name": "unlogged_user_tokens", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "unlogged_user_tokens_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()" - }, - "last_verified": { - "name": "last_verified", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unlogged_user_tokens_token_unique": { - "name": "unlogged_user_tokens_token_unique", - "nullsNotDistinct": false, - "columns": [ - "token" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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.user_notifications": { - "name": "user_notifications", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "user_notifications_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "title": { - "name": "title", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "body": { - "name": "body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "applicable_users": { - "name": "applicable_users", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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": false - }, - "is_permanent": { - "name": "is_permanent", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "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" - ] - }, - "public.staff_permission": { - "name": "staff_permission", - "schema": "public", - "values": [ - "crud_product", - "make_coupon", - "crud_staff_users" - ] - }, - "public.staff_role": { - "name": "staff_role", - "schema": "public", - "values": [ - "super_admin", - "admin", - "marketer", - "delivery_staff" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/0076_snapshot.json b/apps/backend/drizzle/meta/0076_snapshot.json deleted file mode 100644 index b2c4e90..0000000 --- a/apps/backend/drizzle/meta/0076_snapshot.json +++ /dev/null @@ -1,3865 +0,0 @@ -{ - "id": "26c2b560-e848-451d-b8f4-0cbd68e3ea4e", - "prevId": "327cc259-efc0-44ff-b581-2dd28869acdb", - "version": "7", - "dialect": "postgresql", - "tables": { - "mf.address_areas": { - "name": "address_areas", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_areas_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "place_name": { - "name": "place_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "address_areas_zone_id_address_zones_id_fk": { - "name": "address_areas_zone_id_address_zones_id_fk", - "tableFrom": "address_areas", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.address_zones": { - "name": "address_zones", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "address_zones_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "zone_name": { - "name": "zone_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "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 - }, - "google_maps_url": { - "name": "google_maps_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "admin_latitude": { - "name": "admin_latitude", - "type": "real", - "primaryKey": false, - "notNull": false - }, - "admin_longitude": { - "name": "admin_longitude", - "type": "real", - "primaryKey": false, - "notNull": false - }, - "zone_id": { - "name": "zone_id", - "type": "integer", - "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" - }, - "addresses_zone_id_address_zones_id_fk": { - "name": "addresses_zone_id_address_zones_id_fk", - "tableFrom": "addresses", - "tableTo": "address_zones", - "schemaTo": "mf", - "columnsFrom": [ - "zone_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 - }, - "images": { - "name": "images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "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_applicable_products": { - "name": "coupon_applicable_products", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_products_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_products_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_products_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_products_product_id_product_info_id_fk": { - "name": "coupon_applicable_products_product_id_product_info_id_fk", - "tableFrom": "coupon_applicable_products", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_product": { - "name": "unique_coupon_product", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "product_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.coupon_applicable_users": { - "name": "coupon_applicable_users", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "coupon_applicable_users_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "coupon_id": { - "name": "coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "coupon_applicable_users_coupon_id_coupons_id_fk": { - "name": "coupon_applicable_users_coupon_id_coupons_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "coupon_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_applicable_users_user_id_users_id_fk": { - "name": "coupon_applicable_users_user_id_users_id_fk", - "tableFrom": "coupon_applicable_users", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_coupon_user": { - "name": "unique_coupon_user", - "nullsNotDistinct": false, - "columns": [ - "coupon_id", - "user_id" - ] - } - }, - "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 - }, - "order_id": { - "name": "order_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "order_item_id": { - "name": "order_item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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" - }, - "coupon_usage_order_id_orders_id_fk": { - "name": "coupon_usage_order_id_orders_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "coupon_usage_order_item_id_order_items_id_fk": { - "name": "coupon_usage_order_item_id_order_items_id_fk", - "tableFrom": "coupon_usage", - "tableTo": "order_items", - "schemaTo": "mf", - "columnsFrom": [ - "order_item_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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_by": { - "name": "created_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "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 - }, - "is_flash": { - "name": "is_flash", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_capacity_full": { - "name": "is_capacity_full", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "delivery_sequence": { - "name": "delivery_sequence", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "group_ids": { - "name": "group_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.home_banners": { - "name": "home_banners", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "home_banners_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 - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "product_ids": { - "name": "product_ids", - "type": "integer[]", - "primaryKey": false, - "notNull": false - }, - "redirect_url": { - "name": "redirect_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "serial_num": { - "name": "serial_num", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "is_active": { - "name": "is_active", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_updated": { - "name": "last_updated", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "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_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 - }, - "discounted_price": { - "name": "discounted_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "is_packaged": { - "name": "is_packaged", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_package_verified": { - "name": "is_package_verified", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "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 - }, - "is_cancelled_by_admin": { - "name": "is_cancelled_by_admin", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "payment_state": { - "name": "payment_state", - "type": "payment_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "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 - }, - "cancellation_reviewed_at": { - "name": "cancellation_reviewed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "refund_coupon_id": { - "name": "refund_coupon_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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" - }, - "order_status_refund_coupon_id_coupons_id_fk": { - "name": "order_status_refund_coupon_id_coupons_id_fk", - "tableFrom": "order_status", - "tableTo": "coupons", - "schemaTo": "mf", - "columnsFrom": [ - "refund_coupon_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 - }, - "delivery_charge": { - "name": "delivery_charge", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": true, - "default": "'0'" - }, - "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 - }, - "order_group_id": { - "name": "order_group_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "order_group_proportion": { - "name": "order_group_proportion", - "type": "numeric(10, 4)", - "primaryKey": false, - "notNull": false - }, - "is_flash_delivery": { - "name": "is_flash_delivery", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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_group_info": { - "name": "product_group_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_group_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "group_name": { - "name": "group_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()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_group_membership": { - "name": "product_group_membership", - "schema": "mf", - "columns": { - "product_id": { - "name": "product_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "group_id": { - "name": "group_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "added_at": { - "name": "added_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_group_membership_product_id_product_info_id_fk": { - "name": "product_group_membership_product_id_product_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_group_membership_group_id_product_group_info_id_fk": { - "name": "product_group_membership_group_id_product_group_info_id_fk", - "tableFrom": "product_group_membership", - "tableTo": "product_group_info", - "schemaTo": "mf", - "columnsFrom": [ - "group_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_group_membership_pk": { - "name": "product_group_membership_pk", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "group_id" - ] - } - }, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_flash_available": { - "name": "is_flash_available", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "flash_price": { - "name": "flash_price", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "increment_step": { - "name": "increment_step", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "product_quantity": { - "name": "product_quantity", - "type": "real", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "store_id": { - "name": "store_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "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_reviews": { - "name": "product_reviews", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_reviews_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 - }, - "review_body": { - "name": "review_body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "image_urls": { - "name": "image_urls", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "review_time": { - "name": "review_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ratings": { - "name": "ratings", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "admin_response": { - "name": "admin_response", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_response_images": { - "name": "admin_response_images", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "product_reviews_user_id_users_id_fk": { - "name": "product_reviews_user_id_users_id_fk", - "tableFrom": "product_reviews", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_reviews_product_id_product_info_id_fk": { - "name": "product_reviews_product_id_product_info_id_fk", - "tableFrom": "product_reviews", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": { - "rating_check": { - "name": "rating_check", - "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5" - } - }, - "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.product_tag_info": { - "name": "product_tag_info", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tag_info_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "tag_name": { - "name": "tag_name", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "tag_description": { - "name": "tag_description", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "is_dashboard_tag": { - "name": "is_dashboard_tag", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "related_stores": { - "name": "related_stores", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "product_tag_info_tag_name_unique": { - "name": "product_tag_info_tag_name_unique", - "nullsNotDistinct": false, - "columns": [ - "tag_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.product_tags": { - "name": "product_tags", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "product_tags_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 - }, - "tag_id": { - "name": "tag_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "assigned_at": { - "name": "assigned_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "product_tags_product_id_product_info_id_fk": { - "name": "product_tags_product_id_product_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_info", - "schemaTo": "mf", - "columnsFrom": [ - "product_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "product_tags_tag_id_product_tag_info_id_fk": { - "name": "product_tags_tag_id_product_tag_info_id_fk", - "tableFrom": "product_tags", - "tableTo": "product_tag_info", - "schemaTo": "mf", - "columnsFrom": [ - "tag_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_product_tag": { - "name": "unique_product_tag", - "nullsNotDistinct": false, - "columns": [ - "product_id", - "tag_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.refunds": { - "name": "refunds", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refunds_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 - }, - "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'" - }, - "merchant_refund_id": { - "name": "merchant_refund_id", - "type": "varchar(255)", - "primaryKey": false, - "notNull": false - }, - "refund_processed_at": { - "name": "refund_processed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refunds_order_id_orders_id_fk": { - "name": "refunds_order_id_orders_id_fk", - "tableFrom": "refunds", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.reserved_coupons": { - "name": "reserved_coupons", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "reserved_coupons_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "secret_code": { - "name": "secret_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "coupon_code": { - "name": "coupon_code", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "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 - }, - "product_ids": { - "name": "product_ids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "max_value": { - "name": "max_value", - "type": "numeric(10, 2)", - "primaryKey": false, - "notNull": 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 - }, - "exclusive_apply": { - "name": "exclusive_apply", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_redeemed": { - "name": "is_redeemed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "redeemed_by": { - "name": "redeemed_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "redeemed_at": { - "name": "redeemed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_by": { - "name": "created_by", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "reserved_coupons_redeemed_by_users_id_fk": { - "name": "reserved_coupons_redeemed_by_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "redeemed_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "reserved_coupons_created_by_staff_users_id_fk": { - "name": "reserved_coupons_created_by_staff_users_id_fk", - "tableFrom": "reserved_coupons", - "tableTo": "staff_users", - "schemaTo": "mf", - "columnsFrom": [ - "created_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reserved_coupons_secret_code_unique": { - "name": "reserved_coupons_secret_code_unique", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - }, - "unique_secret_code": { - "name": "unique_secret_code", - "nullsNotDistinct": false, - "columns": [ - "secret_code" - ] - } - }, - "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_permissions": { - "name": "staff_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "permission_name": { - "name": "permission_name", - "type": "staff_permission", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_permission_name": { - "name": "unique_permission_name", - "nullsNotDistinct": false, - "columns": [ - "permission_name" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_role_permissions": { - "name": "staff_role_permissions", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_role_permissions_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "staff_permission_id": { - "name": "staff_permission_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_role_permissions_staff_role_id_staff_roles_id_fk": { - "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": { - "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk", - "tableFrom": "staff_role_permissions", - "tableTo": "staff_permissions", - "schemaTo": "mf", - "columnsFrom": [ - "staff_permission_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_permission": { - "name": "unique_role_permission", - "nullsNotDistinct": false, - "columns": [ - "staff_role_id", - "staff_permission_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.staff_roles": { - "name": "staff_roles", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "staff_roles_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "role_name": { - "name": "role_name", - "type": "staff_role", - "typeSchema": "public", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unique_role_name": { - "name": "unique_role_name", - "nullsNotDistinct": false, - "columns": [ - "role_name" - ] - } - }, - "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 - }, - "staff_role_id": { - "name": "staff_role_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "staff_users_staff_role_id_staff_roles_id_fk": { - "name": "staff_users_staff_role_id_staff_roles_id_fk", - "tableFrom": "staff_users", - "tableTo": "staff_roles", - "schemaTo": "mf", - "columnsFrom": [ - "staff_role_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "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 - }, - "image_url": { - "name": "image_url", - "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.unlogged_user_tokens": { - "name": "unlogged_user_tokens", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "unlogged_user_tokens_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()" - }, - "last_verified": { - "name": "last_verified", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "unlogged_user_tokens_token_unique": { - "name": "unlogged_user_tokens_token_unique", - "nullsNotDistinct": false, - "columns": [ - "token" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.upload_url_status": { - "name": "upload_url_status", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "upload_url_status_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "key": { - "name": "key", - "type": "varchar(500)", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "upload_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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 - }, - "is_suspended": { - "name": "is_suspended", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": 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.user_incidents": { - "name": "user_incidents", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "user_incidents_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 - }, - "date_added": { - "name": "date_added", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "admin_comment": { - "name": "admin_comment", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "added_by": { - "name": "added_by", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "negativity_score": { - "name": "negativity_score", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "user_incidents_user_id_users_id_fk": { - "name": "user_incidents_user_id_users_id_fk", - "tableFrom": "user_incidents", - "tableTo": "users", - "schemaTo": "mf", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "user_incidents_order_id_orders_id_fk": { - "name": "user_incidents_order_id_orders_id_fk", - "tableFrom": "user_incidents", - "tableTo": "orders", - "schemaTo": "mf", - "columnsFrom": [ - "order_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "user_incidents_added_by_staff_users_id_fk": { - "name": "user_incidents_added_by_staff_users_id_fk", - "tableFrom": "user_incidents", - "tableTo": "staff_users", - "schemaTo": "mf", - "columnsFrom": [ - "added_by" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "mf.user_notifications": { - "name": "user_notifications", - "schema": "mf", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "user_notifications_id_seq", - "schema": "mf", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "title": { - "name": "title", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "image_url": { - "name": "image_url", - "type": "varchar(500)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "body": { - "name": "body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "applicable_users": { - "name": "applicable_users", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "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": false - }, - "is_permanent": { - "name": "is_permanent", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "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" - ] - }, - "public.staff_permission": { - "name": "staff_permission", - "schema": "public", - "values": [ - "crud_product", - "make_coupon", - "crud_staff_users" - ] - }, - "public.staff_role": { - "name": "staff_role", - "schema": "public", - "values": [ - "super_admin", - "admin", - "marketer", - "delivery_staff" - ] - }, - "public.upload_status": { - "name": "upload_status", - "schema": "public", - "values": [ - "pending", - "claimed" - ] - } - }, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/apps/backend/drizzle/meta/_journal.json b/apps/backend/drizzle/meta/_journal.json deleted file mode 100644 index 572b813..0000000 --- a/apps/backend/drizzle/meta/_journal.json +++ /dev/null @@ -1,545 +0,0 @@ -{ - "version": "7", - "dialect": "postgresql", - "entries": [ - { - "idx": 0, - "version": "7", - "when": 1760786001791, - "tag": "0000_colorful_tinkerer", - "breakpoints": true - }, - { - "idx": 1, - "version": "7", - "when": 1760786267753, - "tag": "0001_busy_titania", - "breakpoints": true - }, - { - "idx": 2, - "version": "7", - "when": 1760876962326, - "tag": "0002_wandering_lifeguard", - "breakpoints": true - }, - { - "idx": 3, - "version": "7", - "when": 1760945207890, - "tag": "0003_tricky_the_twelve", - "breakpoints": true - }, - { - "idx": 4, - "version": "7", - "when": 1760947179526, - "tag": "0004_lively_diamondback", - "breakpoints": true - }, - { - "idx": 5, - "version": "7", - "when": 1760950341110, - "tag": "0005_tricky_warhawk", - "breakpoints": true - }, - { - "idx": 6, - "version": "7", - "when": 1761023107917, - "tag": "0006_outstanding_joystick", - "breakpoints": true - }, - { - "idx": 7, - "version": "7", - "when": 1761034327944, - "tag": "0007_yellow_charles_xavier", - "breakpoints": true - }, - { - "idx": 8, - "version": "7", - "when": 1761034912967, - "tag": "0008_nasty_mathemanic", - "breakpoints": true - }, - { - "idx": 9, - "version": "7", - "when": 1761044394994, - "tag": "0009_peaceful_victor_mancha", - "breakpoints": true - }, - { - "idx": 10, - "version": "7", - "when": 1761046587669, - "tag": "0010_flimsy_reavers", - "breakpoints": true - }, - { - "idx": 11, - "version": "7", - "when": 1761046972821, - "tag": "0011_watery_lady_mastermind", - "breakpoints": true - }, - { - "idx": 12, - "version": "7", - "when": 1761052893579, - "tag": "0012_flawless_jubilee", - "breakpoints": true - }, - { - "idx": 13, - "version": "7", - "when": 1761053583551, - "tag": "0013_married_celestials", - "breakpoints": true - }, - { - "idx": 14, - "version": "7", - "when": 1761140705850, - "tag": "0014_blushing_switch", - "breakpoints": true - }, - { - "idx": 15, - "version": "7", - "when": 1761417716685, - "tag": "0015_sloppy_boomerang", - "breakpoints": true - }, - { - "idx": 16, - "version": "7", - "when": 1761420500681, - "tag": "0016_eminent_thunderbolt_ross", - "breakpoints": true - }, - { - "idx": 17, - "version": "7", - "when": 1761422687927, - "tag": "0017_steady_moira_mactaggert", - "breakpoints": true - }, - { - "idx": 18, - "version": "7", - "when": 1761765314589, - "tag": "0018_simple_tomorrow_man", - "breakpoints": true - }, - { - "idx": 19, - "version": "7", - "when": 1761766904923, - "tag": "0019_productive_mulholland_black", - "breakpoints": true - }, - { - "idx": 20, - "version": "7", - "when": 1761929874782, - "tag": "0020_narrow_charles_xavier", - "breakpoints": true - }, - { - "idx": 21, - "version": "7", - "when": 1761935119476, - "tag": "0021_little_spot", - "breakpoints": true - }, - { - "idx": 22, - "version": "7", - "when": 1761936019322, - "tag": "0022_flippant_omega_sentinel", - "breakpoints": true - }, - { - "idx": 23, - "version": "7", - "when": 1761990924450, - "tag": "0023_sparkling_starjammers", - "breakpoints": true - }, - { - "idx": 24, - "version": "7", - "when": 1761990966682, - "tag": "0024_typical_the_twelve", - "breakpoints": true - }, - { - "idx": 25, - "version": "7", - "when": 1762598863704, - "tag": "0025_tricky_plazm", - "breakpoints": true - }, - { - "idx": 26, - "version": "7", - "when": 1762599227157, - "tag": "0026_flippant_spiral", - "breakpoints": true - }, - { - "idx": 27, - "version": "7", - "when": 1762600106583, - "tag": "0027_huge_iron_monger", - "breakpoints": true - }, - { - "idx": 28, - "version": "7", - "when": 1762624949568, - "tag": "0028_clever_anthem", - "breakpoints": true - }, - { - "idx": 29, - "version": "7", - "when": 1762958926686, - "tag": "0029_short_king_cobra", - "breakpoints": true - }, - { - "idx": 30, - "version": "7", - "when": 1763058797153, - "tag": "0030_superb_exiles", - "breakpoints": true - }, - { - "idx": 31, - "version": "7", - "when": 1763060107438, - "tag": "0031_clean_the_hunter", - "breakpoints": true - }, - { - "idx": 32, - "version": "7", - "when": 1763281196495, - "tag": "0032_tricky_baron_zemo", - "breakpoints": true - }, - { - "idx": 33, - "version": "7", - "when": 1763794531144, - "tag": "0033_brainy_skullbuster", - "breakpoints": true - }, - { - "idx": 34, - "version": "7", - "when": 1764325098973, - "tag": "0034_yummy_riptide", - "breakpoints": true - }, - { - "idx": 35, - "version": "7", - "when": 1764328719715, - "tag": "0035_lyrical_spencer_smythe", - "breakpoints": true - }, - { - "idx": 36, - "version": "7", - "when": 1764331069699, - "tag": "0036_eager_naoko", - "breakpoints": true - }, - { - "idx": 37, - "version": "7", - "when": 1764356000382, - "tag": "0037_pale_outlaw_kid", - "breakpoints": true - }, - { - "idx": 38, - "version": "7", - "when": 1764360189368, - "tag": "0038_volatile_jean_grey", - "breakpoints": true - }, - { - "idx": 39, - "version": "7", - "when": 1764387227083, - "tag": "0039_last_silver_samurai", - "breakpoints": true - }, - { - "idx": 40, - "version": "7", - "when": 1764387505378, - "tag": "0040_brief_albert_cleary", - "breakpoints": true - }, - { - "idx": 41, - "version": "7", - "when": 1764435551419, - "tag": "0041_fine_kronos", - "breakpoints": true - }, - { - "idx": 42, - "version": "7", - "when": 1764478346852, - "tag": "0042_organic_phil_sheldon", - "breakpoints": true - }, - { - "idx": 43, - "version": "7", - "when": 1765085944941, - "tag": "0043_natural_joystick", - "breakpoints": true - }, - { - "idx": 44, - "version": "7", - "when": 1765214759961, - "tag": "0044_rapid_meltdown", - "breakpoints": true - }, - { - "idx": 45, - "version": "7", - "when": 1765393363992, - "tag": "0045_puzzling_leader", - "breakpoints": true - }, - { - "idx": 46, - "version": "7", - "when": 1765890940636, - "tag": "0046_old_aaron_stack", - "breakpoints": true - }, - { - "idx": 47, - "version": "7", - "when": 1765907188857, - "tag": "0047_dark_lester", - "breakpoints": true - }, - { - "idx": 48, - "version": "7", - "when": 1766289001009, - "tag": "0048_talented_stature", - "breakpoints": true - }, - { - "idx": 49, - "version": "7", - "when": 1766889876535, - "tag": "0049_lowly_silverclaw", - "breakpoints": true - }, - { - "idx": 50, - "version": "7", - "when": 1766926392171, - "tag": "0050_fantastic_leopardon", - "breakpoints": true - }, - { - "idx": 51, - "version": "7", - "when": 1767163284231, - "tag": "0051_rapid_typhoid_mary", - "breakpoints": true - }, - { - "idx": 52, - "version": "7", - "when": 1767173986002, - "tag": "0052_pretty_captain_britain", - "breakpoints": true - }, - { - "idx": 53, - "version": "7", - "when": 1767177522196, - "tag": "0053_volatile_salo", - "breakpoints": true - }, - { - "idx": 54, - "version": "7", - "when": 1767181630135, - "tag": "0054_red_spyke", - "breakpoints": true - }, - { - "idx": 55, - "version": "7", - "when": 1767181648828, - "tag": "0055_petite_fallen_one", - "breakpoints": true - }, - { - "idx": 56, - "version": "7", - "when": 1767260845188, - "tag": "0056_fancy_satana", - "breakpoints": true - }, - { - "idx": 57, - "version": "7", - "when": 1767261885187, - "tag": "0057_safe_earthquake", - "breakpoints": true - }, - { - "idx": 58, - "version": "7", - "when": 1767637551901, - "tag": "0058_motionless_next_avengers", - "breakpoints": true - }, - { - "idx": 59, - "version": "7", - "when": 1767791583921, - "tag": "0059_daily_spot", - "breakpoints": true - }, - { - "idx": 60, - "version": "7", - "when": 1768228615788, - "tag": "0060_numerous_terror", - "breakpoints": true - }, - { - "idx": 61, - "version": "7", - "when": 1768239828469, - "tag": "0061_calm_sir_ram", - "breakpoints": true - }, - { - "idx": 62, - "version": "7", - "when": 1768242419782, - "tag": "0062_sloppy_sinister_six", - "breakpoints": true - }, - { - "idx": 63, - "version": "7", - "when": 1768245308174, - "tag": "0063_friendly_mandarin", - "breakpoints": true - }, - { - "idx": 64, - "version": "7", - "when": 1768280501802, - "tag": "0064_milky_revanche", - "breakpoints": true - }, - { - "idx": 65, - "version": "7", - "when": 1768400243774, - "tag": "0065_whole_spencer_smythe", - "breakpoints": true - }, - { - "idx": 66, - "version": "7", - "when": 1768710657343, - "tag": "0066_gorgeous_karnak", - "breakpoints": true - }, - { - "idx": 67, - "version": "7", - "when": 1769280779210, - "tag": "0067_messy_earthquake", - "breakpoints": true - }, - { - "idx": 68, - "version": "7", - "when": 1769709890336, - "tag": "0068_colossal_magma", - "breakpoints": true - }, - { - "idx": 69, - "version": "7", - "when": 1769718702463, - "tag": "0069_violet_smiling_tiger", - "breakpoints": true - }, - { - "idx": 70, - "version": "7", - "when": 1769958949864, - "tag": "0070_known_ares", - "breakpoints": true - }, - { - "idx": 71, - "version": "7", - "when": 1770321591876, - "tag": "0071_moaning_shadow_king", - "breakpoints": true - }, - { - "idx": 72, - "version": "7", - "when": 1770546741428, - "tag": "0072_flowery_deathbird", - "breakpoints": true - }, - { - "idx": 73, - "version": "7", - "when": 1770561175889, - "tag": "0073_faithful_gravity", - "breakpoints": true - }, - { - "idx": 74, - "version": "7", - "when": 1771674555093, - "tag": "0074_outgoing_black_cat", - "breakpoints": true - }, - { - "idx": 75, - "version": "7", - "when": 1772196660983, - "tag": "0075_cuddly_rocket_racer", - "breakpoints": true - }, - { - "idx": 76, - "version": "7", - "when": 1772637259874, - "tag": "0076_sturdy_wolverine", - "breakpoints": true - } - ] -} \ No newline at end of file diff --git a/apps/backend/index.ts b/apps/backend/index.ts index b450036..a8254fb 100755 --- a/apps/backend/index.ts +++ b/apps/backend/index.ts @@ -5,9 +5,7 @@ import cors from "cors"; import multer from "multer"; import path from "path"; import fs from "fs"; -import { db } from '@/src/db/db_index'; -import { staffUsers, userDetails } from '@/src/db/schema'; -import { eq } from 'drizzle-orm'; +import { getStaffUserById, getUserDetailsByUserId, isUserSuspended } from '@/src/dbService'; import mainRouter from '@/src/main-router'; import initFunc from '@/src/lib/init'; import { createExpressMiddleware } from '@trpc/server/adapters/express'; @@ -15,7 +13,7 @@ import { appRouter } from '@/src/trpc/router'; import { TRPCError } from '@trpc/server'; import jwt from 'jsonwebtoken' import signedUrlCache from '@/src/lib/signed-url-cache'; -import { seed } from '@/src/db/seed'; +import { seed } from '@/src/lib/seed'; import '@/src/jobs/jobs-index'; import { startAutomatedJobs } from '@/src/lib/automatedJobs'; @@ -83,9 +81,7 @@ app.use('/api/trpc', createExpressMiddleware({ // Check if this is a staff token (has staffId) if (decoded.staffId) { // This is a staff token, verify staff exists - const staff = await db.query.staffUsers.findFirst({ - where: eq(staffUsers.id, decoded.staffId), - }); + const staff = await getStaffUserById(decoded.staffId); if (staff) { user=staffUser @@ -100,11 +96,9 @@ app.use('/api/trpc', createExpressMiddleware({ user = decoded; // Check if user is suspended - const details = await db.query.userDetails.findFirst({ - where: eq(userDetails.userId, user.userId), - }); + const suspended = await isUserSuspended(user.userId); - if (details?.isSuspended) { + if (suspended) { throw new TRPCError({ code: 'FORBIDDEN', message: 'Account suspended', diff --git a/apps/backend/package.json b/apps/backend/package.json index 7d2e490..20b4edf 100755 --- a/apps/backend/package.json +++ b/apps/backend/package.json @@ -4,10 +4,8 @@ "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "migrate": "drizzle-kit generate:pg", "build": "rimraf ./dist && tsc --project tsconfig.json && tsc-alias -p tsconfig.json", "build2": "rimraf ./dist && tsc", - "db:push": "drizzle-kit push:pg", "db:seed": "tsx src/db/seed.ts", "dev2": "tsx watch index.ts", "dev_node": "tsx watch index.ts", @@ -34,14 +32,12 @@ "cors": "^2.8.5", "dayjs": "^1.11.18", "dotenv": "^17.2.1", - "drizzle-orm": "^0.44.5", "expo-server-sdk": "^4.0.0", "express": "^5.1.0", "fuse.js": "^7.1.0", "jsonwebtoken": "^9.0.2", "multer": "^2.0.2", "node-cron": "^4.2.1", - "pg": "^8.16.3", "razorpay": "^2.9.6", "redis": "^5.9.0", "zod": "^4.1.12" @@ -49,8 +45,6 @@ "devDependencies": { "@types/express": "^5.0.3", "@types/node": "^24.5.2", - "@types/pg": "^8.15.5", - "drizzle-kit": "^0.31.4", "rimraf": "^6.1.2", "ts-node-dev": "^2.0.0", "tsx": "^4.20.5", diff --git a/apps/backend/src/apis/admin-apis/apis/product-tags.controller.ts b/apps/backend/src/apis/admin-apis/apis/product-tags.controller.ts index ab25b69..cc23a52 100644 --- a/apps/backend/src/apis/admin-apis/apis/product-tags.controller.ts +++ b/apps/backend/src/apis/admin-apis/apis/product-tags.controller.ts @@ -1,7 +1,12 @@ import { Request, Response } from "express"; -import { db } from "@/src/db/db_index"; -import { productTagInfo } from "@/src/db/schema"; -import { eq } from "drizzle-orm"; +import { + checkProductTagExistsByName, + createProductTag, + deleteProductTag, + getAllProductTagInfos, + getProductTagInfoById, + updateProductTag, +} from '@/src/dbService' import { ApiError } from "@/src/lib/api-error"; import { imageUploadS3, generateSignedUrlFromS3Url } from "@/src/lib/s3-client"; import { deleteS3Image } from "@/src/lib/delete-image"; @@ -19,9 +24,7 @@ export const createTag = async (req: Request, res: Response) => { } // Check for duplicate tag name - const existingTag = await db.query.productTagInfo.findFirst({ - where: eq(productTagInfo.tagName, tagName.trim()), - }); + const existingTag = await checkProductTagExistsByName(tagName.trim()) if (existingTag) { throw new ApiError("A tag with this name already exists", 400); @@ -47,16 +50,15 @@ export const createTag = async (req: Request, res: Response) => { } } - const [newTag] = await db - .insert(productTagInfo) - .values({ - tagName: tagName.trim(), - tagDescription, - imageUrl, - isDashboardTag: isDashboardTag || false, - relatedStores: parsedRelatedStores, - }) - .returning(); + const createdTag = await createProductTag({ + tagName: tagName.trim(), + tagDescription, + imageUrl, + isDashboardTag: isDashboardTag || false, + relatedStores: parsedRelatedStores, + }) + + const { products, ...newTag } = createdTag // Reinitialize stores to reflect changes in cache scheduleStoreInitialization() @@ -72,10 +74,7 @@ export const createTag = async (req: Request, res: Response) => { * Get all product tags */ export const getAllTags = async (req: Request, res: Response) => { - const tags = await db - .select() - .from(productTagInfo) - .orderBy(productTagInfo.tagName); + const tags = await getAllProductTagInfos() // Generate signed URLs for tag images const tagsWithSignedUrls = await Promise.all( @@ -97,9 +96,7 @@ export const getAllTags = async (req: Request, res: Response) => { export const getTagById = async (req: Request, res: Response) => { const id = req.params.id as string - const tag = await db.query.productTagInfo.findFirst({ - where: eq(productTagInfo.id, parseInt(id)), - }); + const tag = await getProductTagInfoById(parseInt(id)) if (!tag) { throw new ApiError("Tag not found", 404); @@ -125,9 +122,7 @@ export const updateTag = async (req: Request, res: Response) => { const { tagName, tagDescription, isDashboardTag, relatedStores } = req.body; // Get the current tag to check for existing image - const currentTag = await db.query.productTagInfo.findFirst({ - where: eq(productTagInfo.id, parseInt(id)), - }); + const currentTag = await getProductTagInfoById(parseInt(id)) if (!currentTag) { throw new ApiError("Tag not found", 404); @@ -166,24 +161,22 @@ export const updateTag = async (req: Request, res: Response) => { } } - const [updatedTag] = await db - .update(productTagInfo) - .set({ - tagName: tagName?.trim(), - tagDescription, - imageUrl, - isDashboardTag, - relatedStores: parsedRelatedStores, - }) - .where(eq(productTagInfo.id, parseInt(id))) - .returning(); + const updatedTag = await updateProductTag(parseInt(id), { + tagName: tagName?.trim(), + tagDescription, + imageUrl, + isDashboardTag, + relatedStores: parsedRelatedStores, + }) + + const { products, ...updatedTagInfo } = updatedTag // Reinitialize stores to reflect changes in cache scheduleStoreInitialization() // Send response first res.status(200).json({ - tag: updatedTag, + tag: updatedTagInfo, message: "Tag updated successfully", }); }; @@ -195,9 +188,7 @@ export const deleteTag = async (req: Request, res: Response) => { const id = req.params.id as string // Check if tag exists - const tag = await db.query.productTagInfo.findFirst({ - where: eq(productTagInfo.id, parseInt(id)), - }); + const tag = await getProductTagInfoById(parseInt(id)) if (!tag) { throw new ApiError("Tag not found", 404); @@ -214,7 +205,7 @@ export const deleteTag = async (req: Request, res: Response) => { } // Note: This will fail if tag is still assigned to products due to foreign key constraint - await db.delete(productTagInfo).where(eq(productTagInfo.id, parseInt(id))); + await deleteProductTag(parseInt(id)) // Reinitialize stores to reflect changes in cache scheduleStoreInitialization() diff --git a/apps/backend/src/apis/admin-apis/apis/product.controller.ts b/apps/backend/src/apis/admin-apis/apis/product.controller.ts index 1ff6783..45a1ced 100644 --- a/apps/backend/src/apis/admin-apis/apis/product.controller.ts +++ b/apps/backend/src/apis/admin-apis/apis/product.controller.ts @@ -1,11 +1,18 @@ import { Request, Response } from "express"; -import { db } from "@/src/db/db_index"; -import { productInfo, units, specialDeals, productTags } from "@/src/db/schema"; -import { eq, inArray } from "drizzle-orm"; +import { + checkProductExistsByName, + checkUnitExists, + createProduct as createProductRecord, + createSpecialDealsForProduct, + getProductImagesById, + replaceProductTags, + updateProduct as updateProductRecord, + updateProductDeals, +} from '@/src/dbService' import { ApiError } from "@/src/lib/api-error"; +import type { AdminSpecialDeal } from '@packages/shared' import { imageUploadS3, getOriginalUrlFromSignedUrl } from "@/src/lib/s3-client"; import { deleteS3Image } from "@/src/lib/delete-image"; -import type { SpecialDeal } from "@/src/db/types"; import { scheduleStoreInitialization } from '@/src/stores/store-initializer'; @@ -27,20 +34,16 @@ export const createProduct = async (req: Request, res: Response) => { } // Check for duplicate name - const existingProduct = await db.query.productInfo.findFirst({ - where: eq(productInfo.name, name.trim()), - }); + const existingProduct = await checkProductExistsByName(name.trim()) if (existingProduct) { throw new ApiError("A product with this name already exists", 400); } // Check if unit exists - const unit = await db.query.units.findFirst({ - where: eq(units.id, unitId), - }); + const unitExists = await checkUnitExists(unitId) - if (!unit) { + if (!unitExists) { throw new ApiError("Invalid unit ID", 400); } @@ -77,35 +80,17 @@ export const createProduct = async (req: Request, res: Response) => { productData.flashPrice = parseFloat(flashPrice); } - const [newProduct] = await db - .insert(productInfo) - .values(productData) - .returning(); + const newProduct = await createProductRecord(productData) // Handle deals if provided - let createdDeals: SpecialDeal[] = []; + let createdDeals: AdminSpecialDeal[] = [] if (deals && Array.isArray(deals)) { - const dealInserts = deals.map((deal: CreateDeal) => ({ - productId: newProduct.id, - quantity: deal.quantity.toString(), - price: deal.price.toString(), - validTill: new Date(deal.validTill), - })); - - createdDeals = await db - .insert(specialDeals) - .values(dealInserts) - .returning(); + createdDeals = await createSpecialDealsForProduct(newProduct.id, deals) } // Handle tag assignments if provided if (tagIds && Array.isArray(tagIds)) { - const tagAssociations = tagIds.map((tagId: number) => ({ - productId: newProduct.id, - tagId, - })); - - await db.insert(productTags).values(tagAssociations); + await replaceProductTags(newProduct.id, tagIds) } // Reinitialize stores to reflect changes @@ -135,25 +120,21 @@ export const updateProduct = async (req: Request, res: Response) => { } // Check if unit exists - const unit = await db.query.units.findFirst({ - where: eq(units.id, unitId), - }); + const unitExists = await checkUnitExists(unitId) - if (!unit) { + if (!unitExists) { throw new ApiError("Invalid unit ID", 400); } // Get current product to handle image updates - const currentProduct = await db.query.productInfo.findFirst({ - where: eq(productInfo.id, parseInt(id)), - }); + const currentImages = await getProductImagesById(parseInt(id)) - if (!currentProduct) { + if (!currentImages) { throw new ApiError("Product not found", 404); } // Handle image deletions - let currentImages = (currentProduct.images as string[]) || []; + let updatedImages = currentImages || [] if (imagesToDelete && imagesToDelete.length > 0) { // Convert signed URLs to original S3 URLs for comparison const originalUrlsToDelete = imagesToDelete @@ -161,7 +142,7 @@ export const updateProduct = async (req: Request, res: Response) => { .filter(Boolean); // Remove nulls // Find which stored images match the ones to delete - const imagesToRemoveFromDb = currentImages.filter(storedUrl => + const imagesToRemoveFromDb = updatedImages.filter(storedUrl => originalUrlsToDelete.includes(storedUrl) ); @@ -170,7 +151,7 @@ export const updateProduct = async (req: Request, res: Response) => { await Promise.all(deletePromises); // Remove deleted images from current images array - currentImages = currentImages.filter(img => !imagesToRemoveFromDb.includes(img)); + updatedImages = updatedImages.filter(img => !imagesToRemoveFromDb.includes(img)); } // Extract new images from req.files @@ -187,7 +168,7 @@ export const updateProduct = async (req: Request, res: Response) => { } // Combine remaining current images with new uploaded images - const finalImages = [...currentImages, ...uploadedImageUrls]; + const finalImages = [...updatedImages, ...uploadedImageUrls]; const updateData: any = { name, @@ -211,11 +192,7 @@ export const updateProduct = async (req: Request, res: Response) => { updateData.flashPrice = flashPrice ? parseFloat(flashPrice) : null; } - const [updatedProduct] = await db - .update(productInfo) - .set(updateData) - .where(eq(productInfo.id, parseInt(id))) - .returning(); + const updatedProduct = await updateProductRecord(parseInt(id), updateData) if (!updatedProduct) { throw new ApiError("Product not found", 404); @@ -223,76 +200,14 @@ export const updateProduct = async (req: Request, res: Response) => { // Handle deals if provided if (deals && Array.isArray(deals)) { - // Get existing deals - const existingDeals = await db.query.specialDeals.findMany({ - where: eq(specialDeals.productId, parseInt(id)), - }); - - // Create maps for comparison - const existingDealsMap = new Map(existingDeals.map(deal => [`${deal.quantity}-${deal.price}`, deal])); - const newDealsMap = new Map(deals.map((deal: CreateDeal) => [`${deal.quantity}-${deal.price}`, deal])); - - // Find deals to add, update, and remove - const dealsToAdd = deals.filter((deal: CreateDeal) => { - const key = `${deal.quantity}-${deal.price}`; - return !existingDealsMap.has(key); - }); - - const dealsToRemove = existingDeals.filter(deal => { - const key = `${deal.quantity}-${deal.price}`; - return !newDealsMap.has(key); - }); - - const dealsToUpdate = deals.filter((deal: CreateDeal) => { - const key = `${deal.quantity}-${deal.price}`; - const existing = existingDealsMap.get(key); - return existing && existing.validTill.toISOString().split('T')[0] !== deal.validTill; - }); - - // Remove old deals - if (dealsToRemove.length > 0) { - await db.delete(specialDeals).where( - inArray(specialDeals.id, dealsToRemove.map(deal => deal.id)) - ); - } - - // Add new deals - if (dealsToAdd.length > 0) { - const dealInserts = dealsToAdd.map((deal: CreateDeal) => ({ - productId: parseInt(id), - quantity: deal.quantity.toString(), - price: deal.price.toString(), - validTill: new Date(deal.validTill), - })); - await db.insert(specialDeals).values(dealInserts); - } - - // Update existing deals - for (const deal of dealsToUpdate) { - const key = `${deal.quantity}-${deal.price}`; - const existingDeal = existingDealsMap.get(key); - if (existingDeal) { - await db.update(specialDeals) - .set({ validTill: new Date(deal.validTill) }) - .where(eq(specialDeals.id, existingDeal.id)); - } - } + await updateProductDeals(parseInt(id), deals) } // Handle tag assignments if provided // if (tagIds && Array.isArray(tagIds)) { if (tagIds && Boolean(tagIds)) { - // Remove existing tags - await db.delete(productTags).where(eq(productTags.productId, parseInt(id))); - const tagIdsArray = Array.isArray(tagIds) ? tagIds : [+tagIds] - // Add new tags - const tagAssociations = tagIdsArray.map((tagId: number) => ({ - productId: parseInt(id), - tagId, - })); - - await db.insert(productTags).values(tagAssociations); + await replaceProductTags(parseInt(id), tagIdsArray) } // Reinitialize stores to reflect changes diff --git a/apps/backend/src/db/db_index.ts b/apps/backend/src/db/db_index.ts deleted file mode 100755 index 05aebab..0000000 --- a/apps/backend/src/db/db_index.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { drizzle } from "drizzle-orm/node-postgres" -import { migrate } from "drizzle-orm/node-postgres/migrator" -import path from "path" -import * as schema from "@/src/db/schema" - -const db = drizzle({ connection: process.env.DATABASE_URL!, casing: "snake_case", schema: schema }) -// const db = drizzle('postgresql://postgres:postgres@localhost:2345/pooler'); -export { db } diff --git a/apps/backend/src/db/schema.ts b/apps/backend/src/db/schema.ts deleted file mode 100755 index a876101..0000000 --- a/apps/backend/src/db/schema.ts +++ /dev/null @@ -1,689 +0,0 @@ -import { pgTable, pgSchema, integer, varchar, date, boolean, timestamp, numeric, jsonb, pgEnum, unique, real, text, check, decimal } from "drizzle-orm/pg-core"; -import { relations, sql } from "drizzle-orm"; - -const mf = pgSchema('mf'); - - - -export const users = mf.table('users', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - name: varchar({ length: 255 }), - email: varchar({ length: 255 }), - mobile: varchar({ length: 255 }), - createdAt: timestamp('created_at').notNull().defaultNow(), -}, (t) => ({ - unq_email: unique('unique_email').on(t.email), -})); - -export const userDetails = mf.table('user_details', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - userId: integer('user_id').notNull().references(() => users.id).unique(), - bio: varchar('bio', { length: 500 }), - dateOfBirth: date('date_of_birth'), - gender: varchar('gender', { length: 20 }), - occupation: varchar('occupation', { length: 100 }), - profileImage: varchar('profile_image', { length: 500 }), - isSuspended: boolean('is_suspended').notNull().default(false), - createdAt: timestamp('created_at').notNull().defaultNow(), - updatedAt: timestamp('updated_at').notNull().defaultNow(), -}); - -export const userCreds = mf.table('user_creds', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - userId: integer('user_id').notNull().references(() => users.id), - userPassword: varchar('user_password', { length: 255 }).notNull(), - createdAt: timestamp('created_at').notNull().defaultNow(), -}); - -export const addresses = mf.table('addresses', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - userId: integer('user_id').notNull().references(() => users.id), - name: varchar('name', { length: 255 }).notNull(), - phone: varchar('phone', { length: 15 }).notNull(), - addressLine1: varchar('address_line1', { length: 255 }).notNull(), - addressLine2: varchar('address_line2', { length: 255 }), - city: varchar('city', { length: 100 }).notNull(), - state: varchar('state', { length: 100 }).notNull(), - pincode: varchar('pincode', { length: 10 }).notNull(), - isDefault: boolean('is_default').notNull().default(false), - latitude: real('latitude'), - longitude: real('longitude'), - googleMapsUrl: varchar('google_maps_url', { length: 500 }), - adminLatitude: real('admin_latitude'), - adminLongitude: real('admin_longitude'), - zoneId: integer('zone_id').references(() => addressZones.id), - createdAt: timestamp('created_at').notNull().defaultNow(), -}); - -export const addressZones = mf.table('address_zones', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - zoneName: varchar('zone_name', { length: 255 }).notNull(), - addedAt: timestamp('added_at').notNull().defaultNow(), -}); - -export const addressAreas = mf.table('address_areas', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - placeName: varchar('place_name', { length: 255 }).notNull(), - zoneId: integer('zone_id').references(() => addressZones.id), - createdAt: timestamp('created_at').notNull().defaultNow(), -}); - -export const staffUsers = mf.table('staff_users', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - name: varchar({ length: 255 }).notNull(), - password: varchar({ length: 255 }).notNull(), - staffRoleId: integer('staff_role_id').references(() => staffRoles.id), - createdAt: timestamp('created_at').notNull().defaultNow(), -}); - -export const storeInfo = mf.table('store_info', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - name: varchar({ length: 255 }).notNull(), - description: varchar({ length: 500 }), - imageUrl: varchar('image_url', { length: 500 }), - createdAt: timestamp('created_at').notNull().defaultNow(), - owner: integer('owner').notNull().references(() => staffUsers.id), -}); - -export const units = mf.table('units', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - shortNotation: varchar('short_notation', { length: 50 }).notNull(), - fullName: varchar('full_name', { length: 100 }).notNull(), -}, (t) => ({ - unq_short_notation: unique('unique_short_notation').on(t.shortNotation), -})); - -export const productInfo = mf.table('product_info', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - name: varchar({ length: 255 }).notNull(), - shortDescription: varchar('short_description', { length: 500 }), - longDescription: varchar('long_description', { length: 1000 }), - unitId: integer('unit_id').notNull().references(() => units.id), - price: numeric({ precision: 10, scale: 2 }).notNull(), - marketPrice: numeric('market_price', { precision: 10, scale: 2 }), - images: jsonb('images'), - isOutOfStock: boolean('is_out_of_stock').notNull().default(false), - isSuspended: boolean('is_suspended').notNull().default(false), - isFlashAvailable: boolean('is_flash_available').notNull().default(false), - flashPrice: numeric('flash_price', { precision: 10, scale: 2 }), - createdAt: timestamp('created_at').notNull().defaultNow(), - incrementStep: real('increment_step').notNull().default(1), - productQuantity: real('product_quantity').notNull().default(1), - storeId: integer('store_id').references(() => storeInfo.id), -}); - -export const productGroupInfo = mf.table('product_group_info', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - groupName: varchar('group_name', { length: 255 }).notNull(), - description: varchar({ length: 500 }), - createdAt: timestamp('created_at').notNull().defaultNow(), -}); - -export const productGroupMembership = mf.table('product_group_membership', { - productId: integer('product_id').notNull().references(() => productInfo.id), - groupId: integer('group_id').notNull().references(() => productGroupInfo.id), - addedAt: timestamp('added_at').notNull().defaultNow(), -}, (t) => ({ - pk: unique('product_group_membership_pk').on(t.productId, t.groupId), -})); - -export const homeBanners = mf.table('home_banners', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - name: varchar('name', { length: 255 }).notNull(), - imageUrl: varchar('image_url', { length: 500 }).notNull(), - description: varchar('description', { length: 500 }), - productIds: integer('product_ids').array(), - redirectUrl: varchar('redirect_url', { length: 500 }), - serialNum: integer('serial_num'), - isActive: boolean('is_active').notNull().default(false), - createdAt: timestamp('created_at').notNull().defaultNow(), - lastUpdated: timestamp('last_updated').notNull().defaultNow(), -}); - -export const productReviews = mf.table('product_reviews', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - userId: integer('user_id').notNull().references(() => users.id), - productId: integer('product_id').notNull().references(() => productInfo.id), - reviewBody: text('review_body').notNull(), - imageUrls: jsonb('image_urls').$defaultFn(() => []), - reviewTime: timestamp('review_time').notNull().defaultNow(), - ratings: real('ratings').notNull(), - adminResponse: text('admin_response'), - adminResponseImages: jsonb('admin_response_images').$defaultFn(() => []), -}, (t) => ({ - ratingCheck: check('rating_check', sql`${t.ratings} >= 1 AND ${t.ratings} <= 5`), -})); - -export const uploadStatusEnum = pgEnum('upload_status', ['pending', 'claimed']); - -export const staffRoleEnum = pgEnum('staff_role', ['super_admin', 'admin', 'marketer', 'delivery_staff']); - -export const staffPermissionEnum = pgEnum('staff_permission', ['crud_product', 'make_coupon', 'crud_staff_users']); - -export const uploadUrlStatus = mf.table('upload_url_status', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - createdAt: timestamp('created_at').notNull().defaultNow(), - key: varchar('key', { length: 500 }).notNull(), - status: uploadStatusEnum('status').notNull().default('pending'), -}); - -export const productTagInfo = mf.table('product_tag_info', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - tagName: varchar('tag_name', { length: 100 }).notNull().unique(), - tagDescription: varchar('tag_description', { length: 500 }), - imageUrl: varchar('image_url', { length: 500 }), - isDashboardTag: boolean('is_dashboard_tag').notNull().default(false), - relatedStores: jsonb('related_stores').$defaultFn(() => []), - createdAt: timestamp('created_at').notNull().defaultNow(), -}); - -export const productTags = mf.table('product_tags', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - productId: integer('product_id').notNull().references(() => productInfo.id), - tagId: integer('tag_id').notNull().references(() => productTagInfo.id), - assignedAt: timestamp('assigned_at').notNull().defaultNow(), -}, (t) => ({ - unq_product_tag: unique('unique_product_tag').on(t.productId, t.tagId), -})); - -export const deliverySlotInfo = mf.table('delivery_slot_info', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - deliveryTime: timestamp('delivery_time').notNull(), - freezeTime: timestamp('freeze_time').notNull(), - isActive: boolean('is_active').notNull().default(true), - isFlash: boolean('is_flash').notNull().default(false), - isCapacityFull: boolean('is_capacity_full').notNull().default(false), - deliverySequence: jsonb('delivery_sequence').$defaultFn(() => {}), - groupIds: jsonb('group_ids').$defaultFn(() => []), -}); - -export const vendorSnippets = mf.table('vendor_snippets', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - snippetCode: varchar('snippet_code', { length: 255 }).notNull().unique(), - slotId: integer('slot_id').references(() => deliverySlotInfo.id), - isPermanent: boolean('is_permanent').notNull().default(false), - productIds: integer('product_ids').array().notNull(), - validTill: timestamp('valid_till'), - createdAt: timestamp('created_at').notNull().defaultNow(), -}); - -export const vendorSnippetsRelations = relations(vendorSnippets, ({ one }) => ({ - slot: one(deliverySlotInfo, { fields: [vendorSnippets.slotId], references: [deliverySlotInfo.id] }), -})); - -export const productSlots = mf.table('product_slots', { - productId: integer('product_id').notNull().references(() => productInfo.id), - slotId: integer('slot_id').notNull().references(() => deliverySlotInfo.id), -}, (t) => ({ - pk: unique('product_slot_pk').on(t.productId, t.slotId), -})); - -export const specialDeals = mf.table('special_deals', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - productId: integer('product_id').notNull().references(() => productInfo.id), - quantity: numeric({ precision: 10, scale: 2 }).notNull(), - price: numeric({ precision: 10, scale: 2 }).notNull(), - validTill: timestamp('valid_till').notNull(), -}); - -export const orders = mf.table('orders', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - userId: integer('user_id').notNull().references(() => users.id), - addressId: integer('address_id').notNull().references(() => addresses.id), - slotId: integer('slot_id').references(() => deliverySlotInfo.id), - isCod: boolean('is_cod').notNull().default(false), - isOnlinePayment: boolean('is_online_payment').notNull().default(false), - paymentInfoId: integer('payment_info_id').references(() => paymentInfoTable.id), - totalAmount: numeric('total_amount', { precision: 10, scale: 2 }).notNull(), - deliveryCharge: numeric('delivery_charge', { precision: 10, scale: 2 }).notNull().default('0'), - readableId: integer('readable_id').notNull(), - adminNotes: text('admin_notes'), - userNotes: text('user_notes'), - orderGroupId: varchar('order_group_id', { length: 255 }), - orderGroupProportion: decimal('order_group_proportion', { precision: 10, scale: 4 }), - isFlashDelivery: boolean('is_flash_delivery').notNull().default(false), - createdAt: timestamp('created_at').notNull().defaultNow(), -}); - -export const orderItems = mf.table('order_items', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - orderId: integer('order_id').notNull().references(() => orders.id), - productId: integer('product_id').notNull().references(() => productInfo.id), - quantity: varchar('quantity', { length: 50 }).notNull(), - price: numeric({ precision: 10, scale: 2 }).notNull(), - discountedPrice: numeric('discounted_price', { precision: 10, scale: 2 }), - is_packaged: boolean('is_packaged').notNull().default(false), - is_package_verified: boolean('is_package_verified').notNull().default(false), -}); - -export const paymentStatusEnum = pgEnum('payment_status', ['pending', 'success', 'cod', 'failed']); - -export const orderStatus = mf.table('order_status', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - orderTime: timestamp('order_time').notNull().defaultNow(), - userId: integer('user_id').notNull().references(() => users.id), - orderId: integer('order_id').notNull().references(() => orders.id), - isPackaged: boolean('is_packaged').notNull().default(false), - isDelivered: boolean('is_delivered').notNull().default(false), - isCancelled: boolean('is_cancelled').notNull().default(false), - cancelReason: varchar('cancel_reason', { length: 255 }), - isCancelledByAdmin: boolean('is_cancelled_by_admin'), - paymentStatus: paymentStatusEnum('payment_state').notNull().default('pending'), - cancellationUserNotes: text('cancellation_user_notes'), - cancellationAdminNotes: text('cancellation_admin_notes'), - cancellationReviewed: boolean('cancellation_reviewed').notNull().default(false), - cancellationReviewedAt: timestamp('cancellation_reviewed_at'), - refundCouponId: integer('refund_coupon_id').references(() => coupons.id), -}); - -export const paymentInfoTable = mf.table('payment_info', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - status: varchar({ length: 50 }).notNull(), - gateway: varchar({ length: 50 }).notNull(), - orderId: varchar('order_id', { length: 500 }), - token: varchar({ length: 500 }), - merchantOrderId: varchar('merchant_order_id', { length: 255 }).notNull().unique(), - payload: jsonb('payload'), -}); - -export const payments = mf.table('payments', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - status: varchar({ length: 50 }).notNull(), - gateway: varchar({ length: 50 }).notNull(), - orderId: integer('order_id').notNull().references(() => orders.id), - token: varchar({ length: 500 }), - merchantOrderId: varchar('merchant_order_id', { length: 255 }).notNull().unique(), - payload: jsonb('payload'), -}); - -export const refunds = mf.table('refunds', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - orderId: integer('order_id').notNull().references(() => orders.id), - refundAmount: numeric('refund_amount', { precision: 10, scale: 2 }), - refundStatus: varchar('refund_status', { length: 50 }).default('none'), - merchantRefundId: varchar('merchant_refund_id', { length: 255 }), - refundProcessedAt: timestamp('refund_processed_at'), - createdAt: timestamp('created_at').notNull().defaultNow(), -}); - -export const keyValStore = mf.table('key_val_store', { - key: varchar('key', { length: 255 }).primaryKey(), - value: jsonb('value'), -}); - -export const notifications = mf.table('notifications', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - userId: integer('user_id').notNull().references(() => users.id), - title: varchar({ length: 255 }).notNull(), - body: varchar({ length: 512 }).notNull(), - type: varchar({ length: 50 }), - isRead: boolean('is_read').notNull().default(false), - createdAt: timestamp('created_at').notNull().defaultNow(), -}); - -export const productCategories = mf.table('product_categories', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - name: varchar({ length: 255 }).notNull(), - description: varchar({ length: 500 }), -}); - -export const cartItems = mf.table('cart_items', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - userId: integer('user_id').notNull().references(() => users.id), - productId: integer('product_id').notNull().references(() => productInfo.id), - quantity: numeric({ precision: 10, scale: 2 }).notNull(), - addedAt: timestamp('added_at').notNull().defaultNow(), -}, (t) => ({ - unq_user_product: unique('unique_user_product').on(t.userId, t.productId), -})); - -export const complaints = mf.table('complaints', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - userId: integer('user_id').notNull().references(() => users.id), - orderId: integer('order_id').references(() => orders.id), - complaintBody: varchar('complaint_body', { length: 1000 }).notNull(), - images: jsonb('images'), - response: varchar('response', { length: 1000 }), - isResolved: boolean('is_resolved').notNull().default(false), - createdAt: timestamp('created_at').notNull().defaultNow(), -}); - -export const coupons = mf.table('coupons', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - couponCode: varchar('coupon_code', { length: 50 }).notNull().unique('unique_coupon_code'), - isUserBased: boolean('is_user_based').notNull().default(false), - discountPercent: numeric('discount_percent', { precision: 5, scale: 2 }), - flatDiscount: numeric('flat_discount', { precision: 10, scale: 2 }), - minOrder: numeric('min_order', { precision: 10, scale: 2 }), - productIds: jsonb('product_ids'), - createdBy: integer('created_by').references(() => staffUsers.id), - maxValue: numeric('max_value', { precision: 10, scale: 2 }), - isApplyForAll: boolean('is_apply_for_all').notNull().default(false), - validTill: timestamp('valid_till'), - maxLimitForUser: integer('max_limit_for_user'), - isInvalidated: boolean('is_invalidated').notNull().default(false), - exclusiveApply: boolean('exclusive_apply').notNull().default(false), - createdAt: timestamp('created_at').notNull().defaultNow(), -}); - -export const couponUsage = mf.table('coupon_usage', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - userId: integer('user_id').notNull().references(() => users.id), - couponId: integer('coupon_id').notNull().references(() => coupons.id), - orderId: integer('order_id').references(() => orders.id), - orderItemId: integer('order_item_id').references(() => orderItems.id), - usedAt: timestamp('used_at').notNull().defaultNow(), -}); - -export const couponApplicableUsers = mf.table('coupon_applicable_users', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - couponId: integer('coupon_id').notNull().references(() => coupons.id), - userId: integer('user_id').notNull().references(() => users.id), -}, (t) => ({ - unq_coupon_user: unique('unique_coupon_user').on(t.couponId, t.userId), -})); - -export const couponApplicableProducts = mf.table('coupon_applicable_products', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - couponId: integer('coupon_id').notNull().references(() => coupons.id), - productId: integer('product_id').notNull().references(() => productInfo.id), -}, (t) => ({ - unq_coupon_product: unique('unique_coupon_product').on(t.couponId, t.productId), -})); - -export const userIncidents = mf.table('user_incidents', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - userId: integer('user_id').notNull().references(() => users.id), - orderId: integer('order_id').references(() => orders.id), - dateAdded: timestamp('date_added').notNull().defaultNow(), - adminComment: text('admin_comment'), - addedBy: integer('added_by').references(() => staffUsers.id), - negativityScore: integer('negativity_score'), -}); - -export const reservedCoupons = mf.table('reserved_coupons', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - secretCode: varchar('secret_code', { length: 50 }).notNull().unique(), - couponCode: varchar('coupon_code', { length: 50 }).notNull(), - discountPercent: numeric('discount_percent', { precision: 5, scale: 2 }), - flatDiscount: numeric('flat_discount', { precision: 10, scale: 2 }), - minOrder: numeric('min_order', { precision: 10, scale: 2 }), - productIds: jsonb('product_ids'), - maxValue: numeric('max_value', { precision: 10, scale: 2 }), - validTill: timestamp('valid_till'), - maxLimitForUser: integer('max_limit_for_user'), - exclusiveApply: boolean('exclusive_apply').notNull().default(false), - isRedeemed: boolean('is_redeemed').notNull().default(false), - redeemedBy: integer('redeemed_by').references(() => users.id), - redeemedAt: timestamp('redeemed_at'), - createdBy: integer('created_by').notNull().references(() => staffUsers.id), - createdAt: timestamp('created_at').notNull().defaultNow(), -}, (t) => ({ - unq_secret_code: unique('unique_secret_code').on(t.secretCode), -})); - -export const notifCreds = mf.table('notif_creds', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - token: varchar({ length: 500 }).notNull().unique(), - addedAt: timestamp('added_at').notNull().defaultNow(), - userId: integer('user_id').notNull().references(() => users.id), - lastVerified: timestamp('last_verified'), -}); - -export const unloggedUserTokens = mf.table('unlogged_user_tokens', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - token: varchar({ length: 500 }).notNull().unique(), - addedAt: timestamp('added_at').notNull().defaultNow(), - lastVerified: timestamp('last_verified'), -}); - -export const userNotifications = mf.table('user_notifications', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - title: varchar('title', { length: 255 }).notNull(), - imageUrl: varchar('image_url', { length: 500 }), - createdAt: timestamp('created_at').notNull().defaultNow(), - body: text('body').notNull(), - applicableUsers: jsonb('applicable_users'), -}); - -export const staffRoles = mf.table('staff_roles', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - roleName: staffRoleEnum('role_name').notNull(), - createdAt: timestamp('created_at').notNull().defaultNow(), -}, (t) => ({ - unq_role_name: unique('unique_role_name').on(t.roleName), -})); - -export const staffPermissions = mf.table('staff_permissions', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - permissionName: staffPermissionEnum('permission_name').notNull(), - createdAt: timestamp('created_at').notNull().defaultNow(), -}, (t) => ({ - unq_permission_name: unique('unique_permission_name').on(t.permissionName), -})); - -export const staffRolePermissions = mf.table('staff_role_permissions', { - id: integer().primaryKey().generatedAlwaysAsIdentity(), - staffRoleId: integer('staff_role_id').notNull().references(() => staffRoles.id), - staffPermissionId: integer('staff_permission_id').notNull().references(() => staffPermissions.id), - createdAt: timestamp('created_at').notNull().defaultNow(), -}, (t) => ({ - unq_role_permission: unique('unique_role_permission').on(t.staffRoleId, t.staffPermissionId), -})); - -// Relations -export const usersRelations = relations(users, ({ many, one }) => ({ - addresses: many(addresses), - orders: many(orders), - notifications: many(notifications), - cartItems: many(cartItems), - userCreds: one(userCreds), - coupons: many(coupons), - couponUsages: many(couponUsage), - applicableCoupons: many(couponApplicableUsers), - userDetails: one(userDetails), - notifCreds: many(notifCreds), - userIncidents: many(userIncidents), -})); - -export const userCredsRelations = relations(userCreds, ({ one }) => ({ - user: one(users, { fields: [userCreds.userId], references: [users.id] }), -})); - -export const staffUsersRelations = relations(staffUsers, ({ one, many }) => ({ - role: one(staffRoles, { fields: [staffUsers.staffRoleId], references: [staffRoles.id] }), - coupons: many(coupons), - stores: many(storeInfo), -})); - -export const addressesRelations = relations(addresses, ({ one, many }) => ({ - user: one(users, { fields: [addresses.userId], references: [users.id] }), - orders: many(orders), - zone: one(addressZones, { fields: [addresses.zoneId], references: [addressZones.id] }), -})); - -export const unitsRelations = relations(units, ({ many }) => ({ - products: many(productInfo), -})); - -export const productInfoRelations = relations(productInfo, ({ one, many }) => ({ - unit: one(units, { fields: [productInfo.unitId], references: [units.id] }), - store: one(storeInfo, { fields: [productInfo.storeId], references: [storeInfo.id] }), - productSlots: many(productSlots), - specialDeals: many(specialDeals), - orderItems: many(orderItems), - cartItems: many(cartItems), - tags: many(productTags), - applicableCoupons: many(couponApplicableProducts), - reviews: many(productReviews), - groups: many(productGroupMembership), -})); - -export const productTagInfoRelations = relations(productTagInfo, ({ many }) => ({ - products: many(productTags), -})); - -export const productTagsRelations = relations(productTags, ({ one }) => ({ - product: one(productInfo, { fields: [productTags.productId], references: [productInfo.id] }), - tag: one(productTagInfo, { fields: [productTags.tagId], references: [productTagInfo.id] }), -})); - -export const deliverySlotInfoRelations = relations(deliverySlotInfo, ({ many }) => ({ - productSlots: many(productSlots), - orders: many(orders), - vendorSnippets: many(vendorSnippets), -})); - -export const productSlotsRelations = relations(productSlots, ({ one }) => ({ - product: one(productInfo, { fields: [productSlots.productId], references: [productInfo.id] }), - slot: one(deliverySlotInfo, { fields: [productSlots.slotId], references: [deliverySlotInfo.id] }), -})); - -export const specialDealsRelations = relations(specialDeals, ({ one }) => ({ - product: one(productInfo, { fields: [specialDeals.productId], references: [productInfo.id] }), -})); - -export const ordersRelations = relations(orders, ({ one, many }) => ({ - user: one(users, { fields: [orders.userId], references: [users.id] }), - address: one(addresses, { fields: [orders.addressId], references: [addresses.id] }), - slot: one(deliverySlotInfo, { fields: [orders.slotId], references: [deliverySlotInfo.id] }), - orderItems: many(orderItems), - payment: one(payments), - paymentInfo: one(paymentInfoTable, { fields: [orders.paymentInfoId], references: [paymentInfoTable.id] }), - orderStatus: many(orderStatus), - refunds: many(refunds), - couponUsages: many(couponUsage), - userIncidents: many(userIncidents), -})); - -export const orderItemsRelations = relations(orderItems, ({ one }) => ({ - order: one(orders, { fields: [orderItems.orderId], references: [orders.id] }), - product: one(productInfo, { fields: [orderItems.productId], references: [productInfo.id] }), -})); - -export const orderStatusRelations = relations(orderStatus, ({ one }) => ({ - order: one(orders, { fields: [orderStatus.orderId], references: [orders.id] }), - user: one(users, { fields: [orderStatus.userId], references: [users.id] }), - refundCoupon: one(coupons, { fields: [orderStatus.refundCouponId], references: [coupons.id] }), -})); - -export const paymentInfoRelations = relations(paymentInfoTable, ({ one }) => ({ - order: one(orders, { fields: [paymentInfoTable.id], references: [orders.paymentInfoId] }), -})); - -export const paymentsRelations = relations(payments, ({ one }) => ({ - order: one(orders, { fields: [payments.orderId], references: [orders.id] }), -})); - -export const refundsRelations = relations(refunds, ({ one }) => ({ - order: one(orders, { fields: [refunds.orderId], references: [orders.id] }), -})); - -export const notificationsRelations = relations(notifications, ({ one }) => ({ - user: one(users, { fields: [notifications.userId], references: [users.id] }), -})); - -export const productCategoriesRelations = relations(productCategories, ({}) => ({})); - -export const cartItemsRelations = relations(cartItems, ({ one }) => ({ - user: one(users, { fields: [cartItems.userId], references: [users.id] }), - product: one(productInfo, { fields: [cartItems.productId], references: [productInfo.id] }), -})); - -export const complaintsRelations = relations(complaints, ({ one }) => ({ - user: one(users, { fields: [complaints.userId], references: [users.id] }), - order: one(orders, { fields: [complaints.orderId], references: [orders.id] }), -})); - -export const couponsRelations = relations(coupons, ({ one, many }) => ({ - creator: one(staffUsers, { fields: [coupons.createdBy], references: [staffUsers.id] }), - usages: many(couponUsage), - applicableUsers: many(couponApplicableUsers), - applicableProducts: many(couponApplicableProducts), -})); - -export const couponUsageRelations = relations(couponUsage, ({ one }) => ({ - user: one(users, { fields: [couponUsage.userId], references: [users.id] }), - coupon: one(coupons, { fields: [couponUsage.couponId], references: [coupons.id] }), - order: one(orders, { fields: [couponUsage.orderId], references: [orders.id] }), - orderItem: one(orderItems, { fields: [couponUsage.orderItemId], references: [orderItems.id] }), -})); - -export const userDetailsRelations = relations(userDetails, ({ one }) => ({ - user: one(users, { fields: [userDetails.userId], references: [users.id] }), -})); - -export const notifCredsRelations = relations(notifCreds, ({ one }) => ({ - user: one(users, { fields: [notifCreds.userId], references: [users.id] }), -})); - -export const userNotificationsRelations = relations(userNotifications, ({}) => ({ - // No relations needed for now -})); - -export const storeInfoRelations = relations(storeInfo, ({ one, many }) => ({ - owner: one(staffUsers, { fields: [storeInfo.owner], references: [staffUsers.id] }), - products: many(productInfo), -})); - -export const couponApplicableUsersRelations = relations(couponApplicableUsers, ({ one }) => ({ - coupon: one(coupons, { fields: [couponApplicableUsers.couponId], references: [coupons.id] }), - user: one(users, { fields: [couponApplicableUsers.userId], references: [users.id] }), -})); - -export const couponApplicableProductsRelations = relations(couponApplicableProducts, ({ one }) => ({ - coupon: one(coupons, { fields: [couponApplicableProducts.couponId], references: [coupons.id] }), - product: one(productInfo, { fields: [couponApplicableProducts.productId], references: [productInfo.id] }), -})); - -export const reservedCouponsRelations = relations(reservedCoupons, ({ one }) => ({ - redeemedUser: one(users, { fields: [reservedCoupons.redeemedBy], references: [users.id] }), - creator: one(staffUsers, { fields: [reservedCoupons.createdBy], references: [staffUsers.id] }), -})); - -export const productReviewsRelations = relations(productReviews, ({ one }) => ({ - user: one(users, { fields: [productReviews.userId], references: [users.id] }), - product: one(productInfo, { fields: [productReviews.productId], references: [productInfo.id] }), -})); - -export const addressZonesRelations = relations(addressZones, ({ many }) => ({ - addresses: many(addresses), - areas: many(addressAreas), -})); - -export const addressAreasRelations = relations(addressAreas, ({ one }) => ({ - zone: one(addressZones, { fields: [addressAreas.zoneId], references: [addressZones.id] }), -})); - -export const productGroupInfoRelations = relations(productGroupInfo, ({ many }) => ({ - memberships: many(productGroupMembership), -})); - -export const productGroupMembershipRelations = relations(productGroupMembership, ({ one }) => ({ - product: one(productInfo, { fields: [productGroupMembership.productId], references: [productInfo.id] }), - group: one(productGroupInfo, { fields: [productGroupMembership.groupId], references: [productGroupInfo.id] }), -})); - -export const homeBannersRelations = relations(homeBanners, ({}) => ({ - // Relations for productIds array would be more complex, skipping for now -})); - -export const staffRolesRelations = relations(staffRoles, ({ many }) => ({ - staffUsers: many(staffUsers), - rolePermissions: many(staffRolePermissions), -})); - -export const staffPermissionsRelations = relations(staffPermissions, ({ many }) => ({ - rolePermissions: many(staffRolePermissions), -})); - -export const staffRolePermissionsRelations = relations(staffRolePermissions, ({ one }) => ({ - role: one(staffRoles, { fields: [staffRolePermissions.staffRoleId], references: [staffRoles.id] }), - permission: one(staffPermissions, { fields: [staffRolePermissions.staffPermissionId], references: [staffPermissions.id] }), -})); - -export const userIncidentsRelations = relations(userIncidents, ({ one }) => ({ - user: one(users, { fields: [userIncidents.userId], references: [users.id] }), - order: one(orders, { fields: [userIncidents.orderId], references: [orders.id] }), - addedBy: one(staffUsers, { fields: [userIncidents.addedBy], references: [staffUsers.id] }), -})); diff --git a/apps/backend/src/db/seed.ts b/apps/backend/src/db/seed.ts deleted file mode 100644 index 62fddbf..0000000 --- a/apps/backend/src/db/seed.ts +++ /dev/null @@ -1,210 +0,0 @@ -import { - seedUnits, - seedStaffRoles, - seedStaffPermissions, - seedRolePermissions, - seedKeyValStore, - type UnitSeedData, - type RolePermissionAssignment, - type KeyValSeedData, - type StaffRoleName, - type StaffPermissionName, -} from '@/src/dbService' -import { minOrderValue, deliveryCharge } from '@/src/lib/env-exporter' -import { CONST_KEYS } from '@/src/lib/const-keys' - -export async function seed() { - console.log("Seeding database..."); - - // Seed units - const unitsToSeed: UnitSeedData[] = [ - { shortNotation: "Kg", fullName: "Kilogram" }, - { shortNotation: "L", fullName: "Litre" }, - { shortNotation: "Dz", fullName: "Dozen" }, - { shortNotation: "Pc", fullName: "Unit Piece" }, - ]; - await seedUnits(unitsToSeed); - - // Seed staff roles - const rolesToSeed: StaffRoleName[] = ['super_admin', 'admin', 'marketer', 'delivery_staff']; - await seedStaffRoles(rolesToSeed); - - // Seed staff permissions - const permissionsToSeed: StaffPermissionName[] = ['crud_product', 'make_coupon', 'crud_staff_users']; - await seedStaffPermissions(permissionsToSeed); - - // Seed role-permission assignments - const rolePermissionAssignments: RolePermissionAssignment[] = [ - // super_admin gets all permissions - { roleName: 'super_admin', permissionName: 'crud_product' }, - { roleName: 'super_admin', permissionName: 'make_coupon' }, - { roleName: 'super_admin', permissionName: 'crud_staff_users' }, - // admin gets product and coupon permissions - { roleName: 'admin', permissionName: 'crud_product' }, - { roleName: 'admin', permissionName: 'make_coupon' }, - // marketer gets coupon permission - { roleName: 'marketer', permissionName: 'make_coupon' }, - ]; - await seedRolePermissions(rolePermissionAssignments); - - // Seed key-val store constants - const constantsToSeed: KeyValSeedData[] = [ - { key: CONST_KEYS.readableOrderId, value: 0 }, - { key: CONST_KEYS.minRegularOrderValue, value: minOrderValue }, - { key: CONST_KEYS.freeDeliveryThreshold, value: minOrderValue }, - { key: CONST_KEYS.deliveryCharge, value: deliveryCharge }, - { key: CONST_KEYS.flashFreeDeliveryThreshold, value: 500 }, - { key: CONST_KEYS.flashDeliveryCharge, value: 69 }, - { key: CONST_KEYS.popularItems, value: [] }, - { key: CONST_KEYS.allItemsOrder, value: [] }, - { key: CONST_KEYS.versionNum, value: '1.1.0' }, - { key: CONST_KEYS.playStoreUrl, value: 'https://play.google.com/store/apps/details?id=in.freshyo.app' }, - { key: CONST_KEYS.appStoreUrl, value: 'https://apps.apple.com/in/app/freshyo/id6756889077' }, - { key: CONST_KEYS.isFlashDeliveryEnabled, value: false }, - { key: CONST_KEYS.supportMobile, value: '8688182552' }, - { key: CONST_KEYS.supportEmail, value: 'qushammohd@gmail.com' }, - ]; - await seedKeyValStore(constantsToSeed); - - console.log("Seeding completed."); -} - -/* -// Old implementation - direct DB queries: -import { db } from "@/src/db/db_index" -import { units, productInfo, deliverySlotInfo, productSlots, keyValStore, staffRoles, staffPermissions, staffRolePermissions } from "@/src/db/schema" -import { eq } from "drizzle-orm"; - -export async function seed() { - console.log("Seeding database..."); - - // Seed units individually - const unitsToSeed = [ - { shortNotation: "Kg", fullName: "Kilogram" }, - { shortNotation: "L", fullName: "Litre" }, - { shortNotation: "Dz", fullName: "Dozen" }, - { shortNotation: "Pc", fullName: "Unit Piece" }, - ]; - - for (const unit of unitsToSeed) { - const existingUnit = await db.query.units.findFirst({ - where: eq(units.shortNotation, unit.shortNotation), - }); - if (!existingUnit) { - await db.insert(units).values(unit); - } - } - - // Seed staff roles individually - const rolesToSeed = ['super_admin', 'admin', 'marketer', 'delivery_staff'] as const; - - for (const roleName of rolesToSeed) { - const existingRole = await db.query.staffRoles.findFirst({ - where: eq(staffRoles.roleName, roleName), - }); - if (!existingRole) { - await db.insert(staffRoles).values({ roleName }); - } - } - - // Seed staff permissions individually - const permissionsToSeed = ['crud_product', 'make_coupon', 'crud_staff_users'] as const; - - for (const permissionName of permissionsToSeed) { - const existingPermission = await db.query.staffPermissions.findFirst({ - where: eq(staffPermissions.permissionName, permissionName), - }); - if (!existingPermission) { - await db.insert(staffPermissions).values({ permissionName }); - } - } - - // Seed role-permission assignments - await db.transaction(async (tx) => { - // Get role IDs - const superAdminRole = await tx.query.staffRoles.findFirst({ where: eq(staffRoles.roleName, 'super_admin') }); - const adminRole = await tx.query.staffRoles.findFirst({ where: eq(staffRoles.roleName, 'admin') }); - const marketerRole = await tx.query.staffRoles.findFirst({ where: eq(staffRoles.roleName, 'marketer') }); - - // Get permission IDs - const crudProductPerm = await tx.query.staffPermissions.findFirst({ where: eq(staffPermissions.permissionName, 'crud_product') }); - const makeCouponPerm = await tx.query.staffPermissions.findFirst({ where: eq(staffPermissions.permissionName, 'make_coupon') }); - const crudStaffUsersPerm = await tx.query.staffPermissions.findFirst({ where: eq(staffPermissions.permissionName, 'crud_staff_users') }); - - // Assign all permissions to super_admin - [crudProductPerm, makeCouponPerm, crudStaffUsersPerm].forEach(async (perm) => { - if (superAdminRole && perm) { - const existingSuperAdminPerm = await tx.query.staffRolePermissions.findFirst({ - where: eq(staffRolePermissions.staffRoleId, superAdminRole.id) && eq(staffRolePermissions.staffPermissionId, perm.id), - }); - if (!existingSuperAdminPerm) { - await tx.insert(staffRolePermissions).values({ - staffRoleId: superAdminRole.id, - staffPermissionId: perm.id, - }); - } - } - }); - - // Assign all permissions to admin - [crudProductPerm, makeCouponPerm].forEach(async (perm) => { - if (adminRole && perm) { - const existingAdminPerm = await tx.query.staffRolePermissions.findFirst({ - where: eq(staffRolePermissions.staffRoleId, adminRole.id) && eq(staffRolePermissions.staffPermissionId, perm.id), - }); - if (!existingAdminPerm) { - await tx.insert(staffRolePermissions).values({ - staffRoleId: adminRole.id, - staffPermissionId: perm.id, - }); - } - } - }); - - // Assign make_coupon to marketer - if (marketerRole && makeCouponPerm) { - const existingMarketerCoupon = await tx.query.staffRolePermissions.findFirst({ - where: eq(staffRolePermissions.staffRoleId, marketerRole.id) && eq(staffRolePermissions.staffPermissionId, makeCouponPerm.id), - }); - if (!existingMarketerCoupon) { - await tx.insert(staffRolePermissions).values({ - staffRoleId: marketerRole.id, - staffPermissionId: makeCouponPerm.id, - }); - } - } - }); - - // Seed key-val store constants using CONST_KEYS - const constantsToSeed = [ - { key: CONST_KEYS.readableOrderId, value: 0 }, - { key: CONST_KEYS.minRegularOrderValue, value: minOrderValue }, - { key: CONST_KEYS.freeDeliveryThreshold, value: minOrderValue }, - { key: CONST_KEYS.deliveryCharge, value: deliveryCharge }, - { key: CONST_KEYS.flashFreeDeliveryThreshold, value: 500 }, - { key: CONST_KEYS.flashDeliveryCharge, value: 69 }, - { key: CONST_KEYS.popularItems, value: [] }, - { key: CONST_KEYS.allItemsOrder, value: [] }, - { key: CONST_KEYS.versionNum, value: '1.1.0' }, - { key: CONST_KEYS.playStoreUrl, value: 'https://play.google.com/store/apps/details?id=in.freshyo.app' }, - { key: CONST_KEYS.appStoreUrl, value: 'https://apps.apple.com/in/app/freshyo/id6756889077' }, - { key: CONST_KEYS.isFlashDeliveryEnabled, value: false }, - { key: CONST_KEYS.supportMobile, value: '8688182552' }, - { key: CONST_KEYS.supportEmail, value: 'qushammohd@gmail.com' }, - ]; - - for (const constant of constantsToSeed) { - const existing = await db.query.keyValStore.findFirst({ - where: eq(keyValStore.key, constant.key), - }); - if (!existing) { - await db.insert(keyValStore).values({ - key: constant.key, - value: constant.value, - }); - } - } - - console.log("Seeding completed."); -} -*/ diff --git a/apps/backend/src/db/types.ts b/apps/backend/src/db/types.ts deleted file mode 100755 index 64d42de..0000000 --- a/apps/backend/src/db/types.ts +++ /dev/null @@ -1,47 +0,0 @@ -import type { InferSelectModel } from "drizzle-orm"; -import type { - users, - addresses, - units, - productInfo, - deliverySlotInfo, - productSlots, - specialDeals, - orders, - orderItems, - payments, - notifications, - productCategories, - cartItems, - coupons, -} from "@/src/db/schema"; - -export type User = InferSelectModel; -export type Address = InferSelectModel; -export type Unit = InferSelectModel; -export type ProductInfo = InferSelectModel; -export type DeliverySlotInfo = InferSelectModel; -export type ProductSlot = InferSelectModel; -export type SpecialDeal = InferSelectModel; -export type Order = InferSelectModel; -export type OrderItem = InferSelectModel; -export type Payment = InferSelectModel; -export type Notification = InferSelectModel; -export type ProductCategory = InferSelectModel; -export type CartItem = InferSelectModel; -export type Coupon = InferSelectModel; - -// Combined types -export type ProductWithUnit = ProductInfo & { - unit: Unit; -}; - -export type OrderWithItems = Order & { - items: (OrderItem & { product: ProductInfo })[]; - address: Address; - slot: DeliverySlotInfo; -}; - -export type CartItemWithProduct = CartItem & { - product: ProductInfo; -}; diff --git a/apps/backend/src/lib/delete-image.ts b/apps/backend/src/lib/delete-image.ts index dd6dfdd..0d57211 100644 --- a/apps/backend/src/lib/delete-image.ts +++ b/apps/backend/src/lib/delete-image.ts @@ -1,5 +1,3 @@ -import { eq } from "drizzle-orm"; -import { db } from "@/src/db/db_index" import { deleteImageUtil, getOriginalUrlFromSignedUrl } from "@/src/lib/s3-client" import { s3Url } from "@/src/lib/env-exporter" diff --git a/apps/backend/src/lib/notif-service.ts b/apps/backend/src/lib/notif-service.ts index ee1a0d5..40baf9f 100755 --- a/apps/backend/src/lib/notif-service.ts +++ b/apps/backend/src/lib/notif-service.ts @@ -1,7 +1,5 @@ -import { db } from "@/src/db/db_index" import { sendPushNotificationsMany } from "@/src/lib/expo-service" // import { usersTable, notifCredsTable, notificationTable } from "@/src/db/schema"; -import { eq, inArray } from "drizzle-orm"; // Core notification dispatch methods (renamed for clarity) export async function dispatchBulkNotification({ diff --git a/apps/backend/src/lib/payments-utils.ts b/apps/backend/src/lib/payments-utils.ts index bb98a54..9b7c6fc 100644 --- a/apps/backend/src/lib/payments-utils.ts +++ b/apps/backend/src/lib/payments-utils.ts @@ -1,9 +1,5 @@ // import Razorpay from "razorpay"; import { razorpayId, razorpaySecret } from "@/src/lib/env-exporter" -import { db } from "@/src/db/db_index" -import { payments } from "@/src/db/schema" - -type Tx = Parameters[0]>[0]; export class RazorpayPaymentService { // private static instance = new Razorpay({ @@ -25,7 +21,7 @@ export class RazorpayPaymentService { // return razorpayOrder; } - static async insertPaymentRecord(orderId: number, razorpayOrder: any, tx?: Tx) { + static async insertPaymentRecord(orderId: number, razorpayOrder: any, tx?: unknown) { // Use transaction if provided, otherwise use db // const dbInstance = tx || db; // diff --git a/apps/backend/src/lib/roles-manager.ts b/apps/backend/src/lib/roles-manager.ts index 7242bce..80d49c6 100755 --- a/apps/backend/src/lib/roles-manager.ts +++ b/apps/backend/src/lib/roles-manager.ts @@ -1,5 +1,3 @@ -import { db } from "@/src/db/db_index" - /** * Constants for role names to avoid hardcoding and typos */ diff --git a/apps/backend/src/lib/s3-client.ts b/apps/backend/src/lib/s3-client.ts index 7862169..3b4704f 100755 --- a/apps/backend/src/lib/s3-client.ts +++ b/apps/backend/src/lib/s3-client.ts @@ -2,10 +2,8 @@ import { DeleteObjectCommand, DeleteObjectsCommand, PutObjectCommand, S3Client, GetObjectCommand } from "@aws-sdk/client-s3" import { getSignedUrl } from "@aws-sdk/s3-request-presigner" import signedUrlCache from "@/src/lib/signed-url-cache" +import { claimUploadUrlStatus, createUploadUrlStatus } from '@/src/dbService' import { s3AccessKeyId, s3Region, s3Url, s3SecretAccessKey, s3BucketName, assetsDomain } from "@/src/lib/env-exporter" -import { db } from "@/src/db/db_index"; // Adjust path if needed -import { uploadUrlStatus } from "@/src/db/schema" -import { and, eq } from 'drizzle-orm'; const s3Client = new S3Client({ region: s3Region, @@ -161,10 +159,7 @@ export async function generateSignedUrlsFromS3Urls(s3Urls: (string|null)[], expi export async function generateUploadUrl(key: string, mimeType: string, expiresIn: number = 180): Promise { try { // Insert record into upload_url_status - await db.insert(uploadUrlStatus).values({ - key: key, - status: 'pending', - }); + await createUploadUrlStatus(key) // Generate signed upload URL const command = new PutObjectCommand({ @@ -202,16 +197,11 @@ export function extractKeyFromPresignedUrl(url: string): string { export async function claimUploadUrl(url: string): Promise { try { const semiKey = extractKeyFromPresignedUrl(url); - const key = s3BucketName+'/'+ semiKey // Update status to 'claimed' if currently 'pending' - const result = await db - .update(uploadUrlStatus) - .set({ status: 'claimed' }) - .where(and(eq(uploadUrlStatus.key, semiKey), eq(uploadUrlStatus.status, 'pending'))) - .returning(); + const updated = await claimUploadUrlStatus(semiKey) - if (result.length === 0) { + if (!updated) { throw new Error('Upload URL not found or already claimed'); } } catch (error) { diff --git a/apps/backend/src/lib/seed.ts b/apps/backend/src/lib/seed.ts new file mode 100644 index 0000000..9ad0c03 --- /dev/null +++ b/apps/backend/src/lib/seed.ts @@ -0,0 +1,70 @@ +import { + seedUnits, + seedStaffRoles, + seedStaffPermissions, + seedRolePermissions, + seedKeyValStore, + type UnitSeedData, + type RolePermissionAssignment, + type KeyValSeedData, + type StaffRoleName, + type StaffPermissionName, +} from '@/src/dbService' +import { minOrderValue, deliveryCharge } from '@/src/lib/env-exporter' +import { CONST_KEYS } from '@/src/lib/const-keys' + +export async function seed() { + console.log("Seeding database..."); + + // Seed units + const unitsToSeed: UnitSeedData[] = [ + { shortNotation: "Kg", fullName: "Kilogram" }, + { shortNotation: "L", fullName: "Litre" }, + { shortNotation: "Dz", fullName: "Dozen" }, + { shortNotation: "Pc", fullName: "Unit Piece" }, + ]; + await seedUnits(unitsToSeed); + + // Seed staff roles + const rolesToSeed: StaffRoleName[] = ['super_admin', 'admin', 'marketer', 'delivery_staff']; + await seedStaffRoles(rolesToSeed); + + // Seed staff permissions + const permissionsToSeed: StaffPermissionName[] = ['crud_product', 'make_coupon', 'crud_staff_users']; + await seedStaffPermissions(permissionsToSeed); + + // Seed role-permission assignments + const rolePermissionAssignments: RolePermissionAssignment[] = [ + // super_admin gets all permissions + { roleName: 'super_admin', permissionName: 'crud_product' }, + { roleName: 'super_admin', permissionName: 'make_coupon' }, + { roleName: 'super_admin', permissionName: 'crud_staff_users' }, + // admin gets product and coupon permissions + { roleName: 'admin', permissionName: 'crud_product' }, + { roleName: 'admin', permissionName: 'make_coupon' }, + // marketer gets coupon permission + { roleName: 'marketer', permissionName: 'make_coupon' }, + ]; + await seedRolePermissions(rolePermissionAssignments); + + // Seed key-val store constants + const constantsToSeed: KeyValSeedData[] = [ + { key: CONST_KEYS.readableOrderId, value: 0 }, + { key: CONST_KEYS.minRegularOrderValue, value: minOrderValue }, + { key: CONST_KEYS.freeDeliveryThreshold, value: minOrderValue }, + { key: CONST_KEYS.deliveryCharge, value: deliveryCharge }, + { key: CONST_KEYS.flashFreeDeliveryThreshold, value: 500 }, + { key: CONST_KEYS.flashDeliveryCharge, value: 69 }, + { key: CONST_KEYS.popularItems, value: [] }, + { key: CONST_KEYS.allItemsOrder, value: [] }, + { key: CONST_KEYS.versionNum, value: '1.1.0' }, + { key: CONST_KEYS.playStoreUrl, value: 'https://play.google.com/store/apps/details?id=in.freshyo.app' }, + { key: CONST_KEYS.appStoreUrl, value: 'https://apps.apple.com/in/app/freshyo/id6756889077' }, + { key: CONST_KEYS.isFlashDeliveryEnabled, value: false }, + { key: CONST_KEYS.supportMobile, value: '8688182552' }, + { key: CONST_KEYS.supportEmail, value: 'qushammohd@gmail.com' }, + ]; + await seedKeyValStore(constantsToSeed); + + console.log("Seeding completed."); +} diff --git a/apps/backend/src/postgresImporter.ts b/apps/backend/src/postgresImporter.ts index d4e5627..b4e4c02 100644 --- a/apps/backend/src/postgresImporter.ts +++ b/apps/backend/src/postgresImporter.ts @@ -56,12 +56,25 @@ export { deleteProduct, createProduct, updateProduct, + checkProductExistsByName, + checkUnitExists, + getProductImagesById, + createSpecialDealsForProduct, + updateProductDeals, + replaceProductTags, toggleProductOutOfStock, updateSlotProducts, getSlotProductIds, getSlotsProductIds, getAllUnits, getAllProductTags, + getAllProductTagInfos, + getProductTagInfoById, + createProductTag, + getProductTagById, + updateProductTag, + deleteProductTag, + checkProductTagExistsByName, getProductReviews, respondToReview, getAllProductGroups, @@ -275,4 +288,7 @@ export { type KeyValSeedData, type StaffRoleName, type StaffPermissionName, + // Upload URL Helpers + createUploadUrlStatus, + claimUploadUrlStatus, } from 'postgresService' diff --git a/packages/db_helper_postgres/index.ts b/packages/db_helper_postgres/index.ts index 387c9ea..2778cae 100644 --- a/packages/db_helper_postgres/index.ts +++ b/packages/db_helper_postgres/index.ts @@ -74,12 +74,25 @@ export { deleteProduct, createProduct, updateProduct, + checkProductExistsByName, + checkUnitExists, + getProductImagesById, + createSpecialDealsForProduct, + updateProductDeals, + replaceProductTags, toggleProductOutOfStock, updateSlotProducts, getSlotProductIds, getSlotsProductIds, getAllUnits, getAllProductTags, + getAllProductTagInfos, + getProductTagInfoById, + createProductTag, + getProductTagById, + updateProductTag, + deleteProductTag, + checkProductTagExistsByName, getProductReviews, respondToReview, getAllProductGroups, @@ -359,6 +372,12 @@ export { deleteOrdersWithRelations, } from './src/lib/delete-orders'; +// Upload URL Helpers +export { + createUploadUrlStatus, + claimUploadUrlStatus, +} from './src/helper_methods/upload-url'; + // Seed Helpers export { seedUnits, diff --git a/packages/db_helper_postgres/src/admin-apis/product.ts b/packages/db_helper_postgres/src/admin-apis/product.ts index 28f305d..3d6b5d0 100644 --- a/packages/db_helper_postgres/src/admin-apis/product.ts +++ b/packages/db_helper_postgres/src/admin-apis/product.ts @@ -17,6 +17,7 @@ import type { InferInsertModel, InferSelectModel } from 'drizzle-orm' import type { AdminProduct, AdminProductGroupInfo, + AdminProductTagInfo, AdminProductTagWithProducts, AdminProductReview, AdminProductWithDetails, @@ -85,7 +86,7 @@ const mapSpecialDeal = (deal: SpecialDealRow): AdminSpecialDeal => ({ validTill: deal.validTill, }) -const mapTagInfo = (tag: ProductTagInfoRow) => ({ +const mapTagInfo = (tag: ProductTagInfoRow): AdminProductTagInfo => ({ id: tag.id, tagName: tag.tagName, tagDescription: tag.tagDescription ?? null, @@ -280,6 +281,26 @@ export async function getAllProductTags(): Promise { + const tags = await db.query.productTagInfo.findMany({ + orderBy: productTagInfo.tagName, + }) + + return tags.map(mapTagInfo) +} + +export async function getProductTagInfoById(tagId: number): Promise { + const tag = await db.query.productTagInfo.findFirst({ + where: eq(productTagInfo.id, tagId), + }) + + if (!tag) { + return null + } + + return mapTagInfo(tag) +} + export async function getSlotsProductIds(slotIds: number[]): Promise> { if (slotIds.length === 0) { return {} @@ -556,3 +577,252 @@ export async function updateProductPrices(updates: Array<{ return { updatedCount: updates.length, invalidIds: [] } } + +// ============================================================================ +// Product Tag CRUD Operations +// ============================================================================ + +export interface CreateProductTagInput { + tagName: string + tagDescription?: string | null + imageUrl?: string | null + isDashboardTag?: boolean + relatedStores?: number[] +} + +export async function createProductTag(input: CreateProductTagInput): Promise { + const [tag] = await db.insert(productTagInfo).values({ + tagName: input.tagName, + tagDescription: input.tagDescription || null, + imageUrl: input.imageUrl || null, + isDashboardTag: input.isDashboardTag || false, + relatedStores: input.relatedStores || [], + }).returning() + + return { + ...mapTagInfo(tag), + products: [], + } +} + +export async function getProductTagById(tagId: number): Promise { + const tag = await db.query.productTagInfo.findFirst({ + where: eq(productTagInfo.id, tagId), + with: { + products: { + with: { + product: true, + }, + }, + }, + }) + + if (!tag) { + return null + } + + return { + ...mapTagInfo(tag), + products: tag.products.map((assignment) => ({ + productId: assignment.productId, + tagId: assignment.tagId, + assignedAt: assignment.assignedAt, + product: mapProduct(assignment.product), + })), + } +} + +export interface UpdateProductTagInput { + tagName?: string + tagDescription?: string | null + imageUrl?: string | null + isDashboardTag?: boolean + relatedStores?: number[] +} + +export async function updateProductTag(tagId: number, input: UpdateProductTagInput): Promise { + const [tag] = await db.update(productTagInfo).set({ + ...(input.tagName !== undefined && { tagName: input.tagName }), + ...(input.tagDescription !== undefined && { tagDescription: input.tagDescription }), + ...(input.imageUrl !== undefined && { imageUrl: input.imageUrl }), + ...(input.isDashboardTag !== undefined && { isDashboardTag: input.isDashboardTag }), + ...(input.relatedStores !== undefined && { relatedStores: input.relatedStores }), + }).where(eq(productTagInfo.id, tagId)).returning() + + const fullTag = await db.query.productTagInfo.findFirst({ + where: eq(productTagInfo.id, tagId), + with: { + products: { + with: { + product: true, + }, + }, + }, + }) + + return { + ...mapTagInfo(tag), + products: fullTag?.products.map((assignment) => ({ + productId: assignment.productId, + tagId: assignment.tagId, + assignedAt: assignment.assignedAt, + product: mapProduct(assignment.product), + })) || [], + } +} + +export async function deleteProductTag(tagId: number): Promise { + await db.delete(productTagInfo).where(eq(productTagInfo.id, tagId)) +} + +export async function checkProductTagExistsByName(tagName: string): Promise { + const tag = await db.query.productTagInfo.findFirst({ + where: eq(productTagInfo.tagName, tagName), + }) + return !!tag +} + +// ========================================================================== +// Product Helpers for Admin Controller +// ========================================================================== + +export async function checkProductExistsByName(name: string): Promise { + const product = await db.query.productInfo.findFirst({ + where: eq(productInfo.name, name), + columns: { id: true }, + }) + + return !!product +} + +export async function checkUnitExists(unitId: number): Promise { + const unit = await db.query.units.findFirst({ + where: eq(units.id, unitId), + columns: { id: true }, + }) + + return !!unit +} + +export async function getProductImagesById(productId: number): Promise { + const product = await db.query.productInfo.findFirst({ + where: eq(productInfo.id, productId), + columns: { images: true }, + }) + + if (!product) { + return null + } + + return getStringArray(product.images) || [] +} + +export interface CreateSpecialDealInput { + quantity: number + price: number + validTill: string | Date +} + +export async function createSpecialDealsForProduct( + productId: number, + deals: CreateSpecialDealInput[] +): Promise { + if (deals.length === 0) { + return [] + } + + const dealInserts = deals.map((deal) => ({ + productId, + quantity: deal.quantity.toString(), + price: deal.price.toString(), + validTill: new Date(deal.validTill), + })) + + const createdDeals = await db + .insert(specialDeals) + .values(dealInserts) + .returning() + + return createdDeals.map(mapSpecialDeal) +} + +export async function updateProductDeals( + productId: number, + deals: CreateSpecialDealInput[] +): Promise { + if (deals.length === 0) { + await db.delete(specialDeals).where(eq(specialDeals.productId, productId)) + return + } + + const existingDeals = await db.query.specialDeals.findMany({ + where: eq(specialDeals.productId, productId), + }) + + const existingDealsMap = new Map( + existingDeals.map((deal) => [`${deal.quantity}-${deal.price}`, deal]) + ) + const newDealsMap = new Map( + deals.map((deal) => [`${deal.quantity}-${deal.price}`, deal]) + ) + + const dealsToAdd = deals.filter((deal) => { + const key = `${deal.quantity}-${deal.price}` + return !existingDealsMap.has(key) + }) + + const dealsToRemove = existingDeals.filter((deal) => { + const key = `${deal.quantity}-${deal.price}` + return !newDealsMap.has(key) + }) + + const dealsToUpdate = deals.filter((deal) => { + const key = `${deal.quantity}-${deal.price}` + const existing = existingDealsMap.get(key) + const nextValidTill = deal.validTill instanceof Date + ? deal.validTill.toISOString().split('T')[0] + : String(deal.validTill) + return existing && existing.validTill.toISOString().split('T')[0] !== nextValidTill + }) + + if (dealsToRemove.length > 0) { + await db.delete(specialDeals).where( + inArray(specialDeals.id, dealsToRemove.map((deal) => deal.id)) + ) + } + + if (dealsToAdd.length > 0) { + const dealInserts = dealsToAdd.map((deal) => ({ + productId, + quantity: deal.quantity.toString(), + price: deal.price.toString(), + validTill: new Date(deal.validTill), + })) + await db.insert(specialDeals).values(dealInserts) + } + + for (const deal of dealsToUpdate) { + const key = `${deal.quantity}-${deal.price}` + const existingDeal = existingDealsMap.get(key) + if (existingDeal) { + await db.update(specialDeals) + .set({ validTill: new Date(deal.validTill) }) + .where(eq(specialDeals.id, existingDeal.id)) + } + } +} + +export async function replaceProductTags(productId: number, tagIds: number[]): Promise { + await db.delete(productTags).where(eq(productTags.productId, productId)) + + if (tagIds.length === 0) { + return + } + + const tagAssociations = tagIds.map((tagId) => ({ + productId, + tagId, + })) + + await db.insert(productTags).values(tagAssociations) +} diff --git a/packages/db_helper_postgres/src/helper_methods/upload-url.ts b/packages/db_helper_postgres/src/helper_methods/upload-url.ts new file mode 100644 index 0000000..7b121a7 --- /dev/null +++ b/packages/db_helper_postgres/src/helper_methods/upload-url.ts @@ -0,0 +1,20 @@ +import { and, eq } from 'drizzle-orm' +import { db } from '../db/db_index' +import { uploadUrlStatus } from '../db/schema' + +export async function createUploadUrlStatus(key: string): Promise { + await db.insert(uploadUrlStatus).values({ + key, + status: 'pending', + }) +} + +export async function claimUploadUrlStatus(key: string): Promise { + const result = await db + .update(uploadUrlStatus) + .set({ status: 'claimed' }) + .where(and(eq(uploadUrlStatus.key, key), eq(uploadUrlStatus.status, 'pending'))) + .returning() + + return result.length > 0 +}