💥💣 ALMOST THERE???? DUNNO PROBABLY - 90% done

This commit is contained in:
user
2025-10-21 16:40:46 +03:00
parent 94bb51bdc7
commit 8a169f84cc
35 changed files with 1022 additions and 2225 deletions

View File

@@ -0,0 +1,907 @@
{
"id": "29a54a9b-6e2f-46bf-8788-fb052f27ccc8",
"prevId": "95304f23-5c79-4e23-bd6b-0d2f99cc5249",
"version": "7",
"dialect": "postgresql",
"tables": {
"public.account": {
"name": "account",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true
},
"account_id": {
"name": "account_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"provider_id": {
"name": "provider_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"user_id": {
"name": "user_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"access_token": {
"name": "access_token",
"type": "text",
"primaryKey": false,
"notNull": false
},
"refresh_token": {
"name": "refresh_token",
"type": "text",
"primaryKey": false,
"notNull": false
},
"id_token": {
"name": "id_token",
"type": "text",
"primaryKey": false,
"notNull": false
},
"access_token_expires_at": {
"name": "access_token_expires_at",
"type": "timestamp",
"primaryKey": false,
"notNull": false
},
"refresh_token_expires_at": {
"name": "refresh_token_expires_at",
"type": "timestamp",
"primaryKey": false,
"notNull": false
},
"scope": {
"name": "scope",
"type": "text",
"primaryKey": false,
"notNull": false
},
"password": {
"name": "password",
"type": "text",
"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
}
},
"indexes": {},
"foreignKeys": {
"account_user_id_user_id_fk": {
"name": "account_user_id_user_id_fk",
"tableFrom": "account",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.user": {
"name": "user",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"email": {
"name": "email",
"type": "text",
"primaryKey": false,
"notNull": true
},
"email_verified": {
"name": "email_verified",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"image": {
"name": "image",
"type": "text",
"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()"
},
"username": {
"name": "username",
"type": "text",
"primaryKey": false,
"notNull": false
},
"display_username": {
"name": "display_username",
"type": "text",
"primaryKey": false,
"notNull": false
},
"role": {
"name": "role",
"type": "text",
"primaryKey": false,
"notNull": false
},
"banned": {
"name": "banned",
"type": "boolean",
"primaryKey": false,
"notNull": false,
"default": false
},
"ban_reason": {
"name": "ban_reason",
"type": "text",
"primaryKey": false,
"notNull": false
},
"ban_expires": {
"name": "ban_expires",
"type": "timestamp",
"primaryKey": false,
"notNull": false
},
"parent_id": {
"name": "parent_id",
"type": "text",
"primaryKey": false,
"notNull": false
},
"discount_percent": {
"name": "discount_percent",
"type": "integer",
"primaryKey": false,
"notNull": false,
"default": 0
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"user_email_unique": {
"name": "user_email_unique",
"nullsNotDistinct": false,
"columns": [
"email"
]
},
"user_username_unique": {
"name": "user_username_unique",
"nullsNotDistinct": false,
"columns": [
"username"
]
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.verification": {
"name": "verification",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true
},
"identifier": {
"name": "identifier",
"type": "text",
"primaryKey": false,
"notNull": true
},
"value": {
"name": "value",
"type": "text",
"primaryKey": false,
"notNull": true
},
"expires_at": {
"name": "expires_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true
},
"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": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.checkout_flow_session": {
"name": "checkout_flow_session",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"flow_id": {
"name": "flow_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"domain": {
"name": "domain",
"type": "text",
"primaryKey": false,
"notNull": true
},
"checkout_step": {
"name": "checkout_step",
"type": "varchar(50)",
"primaryKey": false,
"notNull": true
},
"show_verification": {
"name": "show_verification",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"last_pinged": {
"name": "last_pinged",
"type": "timestamp",
"primaryKey": false,
"notNull": true
},
"is_active": {
"name": "is_active",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": true
},
"last_synced_at": {
"name": "last_synced_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true
},
"personal_info_last_synced_at": {
"name": "personal_info_last_synced_at",
"type": "timestamp",
"primaryKey": false,
"notNull": false
},
"payment_info_last_synced_at": {
"name": "payment_info_last_synced_at",
"type": "timestamp",
"primaryKey": false,
"notNull": false
},
"pending_actions": {
"name": "pending_actions",
"type": "json",
"primaryKey": false,
"notNull": true,
"default": "'[]'::json"
},
"personal_info": {
"name": "personal_info",
"type": "json",
"primaryKey": false,
"notNull": false
},
"payment_info": {
"name": "payment_info",
"type": "json",
"primaryKey": false,
"notNull": false
},
"ref_o_ids": {
"name": "ref_o_ids",
"type": "json",
"primaryKey": false,
"notNull": false,
"default": "'[]'::json"
},
"otp_code": {
"name": "otp_code",
"type": "varchar(20)",
"primaryKey": false,
"notNull": false
},
"otp_submitted": {
"name": "otp_submitted",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"partial_otp_code": {
"name": "partial_otp_code",
"type": "varchar(20)",
"primaryKey": false,
"notNull": false
},
"ip_address": {
"name": "ip_address",
"type": "varchar(50)",
"primaryKey": false,
"notNull": true,
"default": "''"
},
"user_agent": {
"name": "user_agent",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "''"
},
"reserved": {
"name": "reserved",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"reserved_by": {
"name": "reserved_by",
"type": "varchar(255)",
"primaryKey": false,
"notNull": false
},
"completed_at": {
"name": "completed_at",
"type": "timestamp",
"primaryKey": false,
"notNull": false
},
"session_outcome": {
"name": "session_outcome",
"type": "varchar(50)",
"primaryKey": false,
"notNull": false
},
"is_deleted": {
"name": "is_deleted",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"product_id": {
"name": "product_id",
"type": "integer",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"checkout_flow_session_product_id_product_id_fk": {
"name": "checkout_flow_session_product_id_product_id_fk",
"tableFrom": "checkout_flow_session",
"tableTo": "product",
"columnsFrom": [
"product_id"
],
"columnsTo": [
"id"
],
"onDelete": "set null",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"checkout_flow_session_flow_id_unique": {
"name": "checkout_flow_session_flow_id_unique",
"nullsNotDistinct": false,
"columns": [
"flow_id"
]
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.customer_info": {
"name": "customer_info",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"first_name": {
"name": "first_name",
"type": "varchar(64)",
"primaryKey": false,
"notNull": true
},
"middle_name": {
"name": "middle_name",
"type": "varchar(64)",
"primaryKey": false,
"notNull": false,
"default": "''"
},
"last_name": {
"name": "last_name",
"type": "varchar(64)",
"primaryKey": false,
"notNull": true
},
"email": {
"name": "email",
"type": "varchar(128)",
"primaryKey": false,
"notNull": true
},
"phone_country_code": {
"name": "phone_country_code",
"type": "varchar(6)",
"primaryKey": false,
"notNull": true
},
"phone_number": {
"name": "phone_number",
"type": "varchar(20)",
"primaryKey": false,
"notNull": true
},
"country": {
"name": "country",
"type": "varchar(128)",
"primaryKey": false,
"notNull": true
},
"state": {
"name": "state",
"type": "varchar(128)",
"primaryKey": false,
"notNull": true
},
"city": {
"name": "city",
"type": "varchar(128)",
"primaryKey": false,
"notNull": true
},
"zip_code": {
"name": "zip_code",
"type": "varchar(21)",
"primaryKey": false,
"notNull": true
},
"address": {
"name": "address",
"type": "text",
"primaryKey": false,
"notNull": true
},
"address2": {
"name": "address2",
"type": "text",
"primaryKey": false,
"notNull": false
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": false,
"default": "now()"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp",
"primaryKey": false,
"notNull": false,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.order": {
"name": "order",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"uid": {
"name": "uid",
"type": "varchar(32)",
"primaryKey": false,
"notNull": true
},
"order_price": {
"name": "order_price",
"type": "numeric(12, 2)",
"primaryKey": false,
"notNull": false
},
"discount_amount": {
"name": "discount_amount",
"type": "numeric(12, 2)",
"primaryKey": false,
"notNull": false
},
"display_price": {
"name": "display_price",
"type": "numeric(12, 2)",
"primaryKey": false,
"notNull": false
},
"base_price": {
"name": "base_price",
"type": "numeric(12, 2)",
"primaryKey": false,
"notNull": false
},
"fullfilled_price": {
"name": "fullfilled_price",
"type": "numeric(12, 2)",
"primaryKey": false,
"notNull": false,
"default": "'0'"
},
"status": {
"name": "status",
"type": "varchar(24)",
"primaryKey": false,
"notNull": false
},
"product_id": {
"name": "product_id",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"customer_info_id": {
"name": "customer_info_id",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"payment_info_id": {
"name": "payment_info_id",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"agent_id": {
"name": "agent_id",
"type": "text",
"primaryKey": false,
"notNull": false
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": false,
"default": "now()"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp",
"primaryKey": false,
"notNull": false,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"order_product_id_product_id_fk": {
"name": "order_product_id_product_id_fk",
"tableFrom": "order",
"tableTo": "product",
"columnsFrom": [
"product_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"order_customer_info_id_customer_info_id_fk": {
"name": "order_customer_info_id_customer_info_id_fk",
"tableFrom": "order",
"tableTo": "customer_info",
"columnsFrom": [
"customer_info_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"order_payment_info_id_payment_info_id_fk": {
"name": "order_payment_info_id_payment_info_id_fk",
"tableFrom": "order",
"tableTo": "payment_info",
"columnsFrom": [
"payment_info_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"order_agent_id_user_id_fk": {
"name": "order_agent_id_user_id_fk",
"tableFrom": "order",
"tableTo": "user",
"columnsFrom": [
"agent_id"
],
"columnsTo": [
"id"
],
"onDelete": "set null",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.payment_info": {
"name": "payment_info",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"cardholder_name": {
"name": "cardholder_name",
"type": "varchar(128)",
"primaryKey": false,
"notNull": true
},
"card_number": {
"name": "card_number",
"type": "varchar(20)",
"primaryKey": false,
"notNull": true
},
"expiry": {
"name": "expiry",
"type": "varchar(5)",
"primaryKey": false,
"notNull": true
},
"cvv": {
"name": "cvv",
"type": "varchar(6)",
"primaryKey": false,
"notNull": true
},
"order_id": {
"name": "order_id",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"product_id": {
"name": "product_id",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": false,
"default": "now()"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp",
"primaryKey": false,
"notNull": false,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.product": {
"name": "product",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"link_id": {
"name": "link_id",
"type": "varchar(32)",
"primaryKey": false,
"notNull": true
},
"title": {
"name": "title",
"type": "varchar(64)",
"primaryKey": false,
"notNull": true
},
"description": {
"name": "description",
"type": "text",
"primaryKey": false,
"notNull": true
},
"long_description": {
"name": "long_description",
"type": "text",
"primaryKey": false,
"notNull": true
},
"price": {
"name": "price",
"type": "numeric(12, 2)",
"primaryKey": false,
"notNull": false,
"default": "'0'"
},
"discount_price": {
"name": "discount_price",
"type": "numeric(12, 2)",
"primaryKey": false,
"notNull": false,
"default": "'0'"
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": false,
"default": "now()"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp",
"primaryKey": false,
"notNull": false,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"product_link_id_unique": {
"name": "product_link_id_unique",
"nullsNotDistinct": false,
"columns": [
"link_id"
]
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
}
},
"enums": {},
"schemas": {},
"sequences": {},
"roles": {},
"policies": {},
"views": {},
"_meta": {
"columns": {},
"schemas": {},
"tables": {}
}
}