findy
Tables (36)
beacon_signal_logs
- beacon_signal_log_id — BIGSERIAL — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- store_id — BIGINT — Foreign key → stores.store_id — NOT NULL
- beacon_id — BIGINT — Foreign key → beacons.beacon_id — NOT NULL
- timestamp_iso — TIMESTAMP
- mac — macaddr
- bluetooth_address_hex — CHAR(14)
- rssi — INTEGER
- uuid — VARCHAR(30)
- major — INTEGER
- minor — INTEGER
- tx — INTEGER
- nearest_zone — INTEGER
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
beacons
- beacon_id — BIGSERIAL — Primary key — NOT NULL
- store_id — BIGINT — Foreign key → stores.store_id — NOT NULL
- grid_id — BIGINT — Foreign key → grids.grid_id — NOT NULL
- beacon_uuid — VARCHAR(255) — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
cart_items
- cart_item_id — BIGSERIAL — Primary key — NOT NULL
- cart_id — BIGINT — Foreign key → carts.cart_id — NOT NULL
- product_id — BIGINT — Foreign key → products.product_id — NOT NULL
- quantity — INTEGER — NOT NULL
- is_checked — BOOLEAN — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
carts
- cart_id — BIGSERIAL — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
categories
- category_id — BIGSERIAL — Primary key — NOT NULL
- parent_category_id — BIGINT — Foreign key → categories.category_id
- category_name — VARCHAR(100) — NOT NULL
- is_active — BOOLEAN — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
congestion_logs
- congestion_log_id — BIGSERIAL — Primary key — NOT NULL
- store_id — BIGINT — Foreign key → stores.store_id — NOT NULL
- zone_id — BIGINT — Foreign key → store_zones.zone_id — NOT NULL
- user_count — INTEGER — NOT NULL
- congestion_level — VARCHAR(30) — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
coupon_products
- coupon_id — BIGINT — Foreign key → coupons.coupon_id — NOT NULL
- product_id — BIGINT — Foreign key → products.product_id — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
coupons
- coupon_id — BIGSERIAL — Primary key — NOT NULL
- coupon_name — VARCHAR(100) — NOT NULL
- coupon_type — VARCHAR(30) — NOT NULL
- discount_type — VARCHAR(30) — NOT NULL
- discount_value — INTEGER — NOT NULL
- is_stackable — BOOLEAN — NOT NULL
- min_order_amount — INTEGER — NOT NULL
- start_at — TIMESTAMP — NOT NULL
- end_at — TIMESTAMP — NOT NULL
- period_type — VARCHAR(30) — NOT NULL
- days_limit — INTEGER
- is_active — BOOLEAN — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
grids
- grid_id — BIGSERIAL — Primary key — NOT NULL
- store_id — BIGINT — Foreign key → stores.store_id — NOT NULL
- grid_x — INTEGER — NOT NULL
- grid_y — INTEGER — NOT NULL
- cell_type — VARCHAR(30) — NOT NULL
- is_active — BOOLEAN — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
inventories
- inventory_id — BIGSERIAL — Primary key — NOT NULL
- product_id — BIGINT — Foreign key → products.product_id — NOT NULL
- store_id — BIGINT — Foreign key → stores.store_id — NOT NULL
- stock_quantity — INTEGER — NOT NULL
- unit — VARCHAR(30) — NOT NULL
- stock_status — VARCHAR(30) — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
notifications
- notification_id — BIGSERIAL — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- notification_type — VARCHAR(30) — NOT NULL
- title — VARCHAR(255) — NOT NULL
- content — TEXT — NOT NULL
- is_read — BOOLEAN — NOT NULL
- sent_at — TIMESTAMP — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
order_items
- order_item_id — BIGSERIAL — Primary key — NOT NULL
- order_id — BIGINT — Foreign key → orders.order_id — NOT NULL
- cart_item_id — BIGINT — Foreign key → cart_items.cart_item_id
- product_id — BIGINT — Foreign key → products.product_id — NOT NULL
- quantity — INTEGER — NOT NULL
- product_price — INTEGER — NOT NULL
- discount_amount — INTEGER — NOT NULL
- final_amount — INTEGER — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
orders
- order_id — BIGSERIAL — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- shopping_list_id — BIGINT — Foreign key → shopping_lists.shopping_list_id
- coupon_id — BIGINT — Foreign key → coupons.coupon_id
- user_coupon_id — BIGINT — Foreign key → user_coupons.user_coupon_id
- total_amount — INTEGER — NOT NULL
- discount_amount — INTEGER — NOT NULL
- final_amount — INTEGER — NOT NULL
- earned_reward — INTEGER — NOT NULL
- order_status — VARCHAR(30) — NOT NULL
- ordered_at — TIMESTAMP — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
product_locations
- product_location_id — BIGSERIAL — Primary key — NOT NULL
- product_id — BIGINT — Foreign key → products.product_id — NOT NULL
- store_id — BIGINT — Foreign key → stores.store_id — NOT NULL
- zone_id — BIGINT — Foreign key → store_zones.zone_id — NOT NULL
- shelf_id — BIGINT — Foreign key → shelves.shelf_id — NOT NULL
- access_grid_id — BIGINT — Foreign key → grids.grid_id
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
product_rankings
- product_ranking_id — BIGSERIAL — Primary key — NOT NULL
- product_id — BIGINT — Foreign key → products.product_id — NOT NULL
- ranking_type — VARCHAR(30) — NOT NULL
- rank_no — INTEGER — NOT NULL
- base_date — DATE — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
products
- product_id — BIGSERIAL — Primary key — NOT NULL
- category_id — BIGINT — Foreign key → categories.category_id — NOT NULL
- brand_name — VARCHAR(100)
- product_name — VARCHAR(255) — NOT NULL
- barcode — VARCHAR(100) — NOT NULL
- original_price — INTEGER — NOT NULL
- sale_price — INTEGER — NOT NULL
- discount_rate — NUMERIC(5,2) — NOT NULL
- description — TEXT
- image_url — VARCHAR(500)
- packaging_type — VARCHAR(100)
- sales_unit — VARCHAR(100)
- volume — VARCHAR(100)
- allergy_info — TEXT
- badge_text — VARCHAR(100)
- category_confidence — BIGINT
- category_classified_by — VARCHAR(30)
- category_review_required — BOOLEAN
- sale_status — VARCHAR(30) — NOT NULL
- is_deleted — BOOLEAN — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
promotion_products
- promotion_product_id — BIGSERIAL — Primary key — NOT NULL
- promotion_id — BIGINT — Foreign key → promotions.promotion_id — NOT NULL
- product_id — BIGINT — Foreign key → products.product_id — NOT NULL
- grid_id — BIGINT — Foreign key → grids.grid_id — NOT NULL
- promotion_price — INTEGER
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
promotions
- promotion_id — BIGSERIAL — Primary key — NOT NULL
- promotion_name — VARCHAR(100) — NOT NULL
- promotion_type — VARCHAR(30) — NOT NULL
- min_purchase_amount — INTEGER
- buy_quantity — INTEGER
- gift_item — VARCHAR(255)
- discount_rate — NUMERIC(5,2)
- start_at — TIMESTAMP — NOT NULL
- end_at — TIMESTAMP — NOT NULL
- status — VARCHAR(30) — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
recent_view_products
- recent_view_id — BIGSERIAL — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- product_id — BIGINT — Foreign key → products.product_id — NOT NULL
- viewed_at — TIMESTAMP — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
recommendation_logs
- recommendation_log_id — BIGSERIAL — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id
- product_id — BIGINT — Foreign key → products.product_id — NOT NULL
- source_product_id — BIGINT — Foreign key → products.product_id
- recommendation_type — VARCHAR(30) — NOT NULL
- display_position — VARCHAR(50)
- is_clicked — BOOLEAN — NOT NULL
- is_purchased — BOOLEAN — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
rewards
- reward_history_id — BIGSERIAL — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- order_id — BIGINT — Foreign key → orders.order_id
- reward_type — VARCHAR(30) — NOT NULL
- reward_amount — INTEGER — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
search_logs
- search_log_id — BIGSERIAL — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id
- keyword — VARCHAR(255) — NOT NULL
- searched_at — TIMESTAMP — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
shelves
- shelf_id — BIGSERIAL — Primary key — NOT NULL
- zone_id — BIGINT — Foreign key → store_zones.zone_id — NOT NULL
- shelf_number — INTEGER — NOT NULL
- grid_id — BIGINT — Foreign key → grids.grid_id — NOT NULL
- is_active — BOOLEAN — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
shopping_list_items
- shopping_list_item_id — BIGSERIAL — Primary key — NOT NULL
- shopping_list_id — BIGINT — Foreign key → shopping_lists.shopping_list_id — NOT NULL
- product_id — BIGINT — Foreign key → products.product_id — NOT NULL
- quantity — INTEGER — NOT NULL
- scanned_quantity — INTEGER
- scan_status — VARCHAR(30) — NOT NULL
- scanned_at — TIMESTAMP
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
shopping_lists
- shopping_list_id — BIGSERIAL — Primary key — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
- cart_id — BIGINT — Foreign key → carts.cart_id — NOT NULL
- user_id — BIGINT
shopping_styles
- shopping_style_id — BIGSERIAL — Primary key — NOT NULL
- style_name — VARCHAR(100) — NOT NULL
- is_active — BOOLEAN — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
social_accounts
- social_account_id — BIGSERIAL — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- provider — VARCHAR(30) — NOT NULL
- provider_user_id — VARCHAR(255) — NOT NULL
- provider_email — VARCHAR(255)
- is_connected — BOOLEAN — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
store_maps
- map_id — BIGSERIAL — Primary key — NOT NULL
- store_id — BIGINT — Foreign key → stores.store_id — NOT NULL
- map_image_url — VARCHAR(500)
- width — INTEGER — NOT NULL
- height — INTEGER — NOT NULL
- start_date — DATE
- end_date — DATE
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
store_zones
- zone_id — BIGSERIAL — Primary key — NOT NULL
- store_id — BIGINT — Foreign key → stores.store_id — NOT NULL
- grid_id — BIGINT — Foreign key → grids.grid_id — NOT NULL
- zone_name — VARCHAR(100) — NOT NULL
- zone_number — INTEGER — NOT NULL
- is_active — BOOLEAN — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
stores
- store_id — BIGSERIAL — Primary key — NOT NULL
- store_name — VARCHAR(100) — NOT NULL
- address — VARCHAR(255) — NOT NULL
- status — VARCHAR(30) — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
user_coupons
- user_coupon_id — BIGSERIAL — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- coupon_id — BIGINT — Foreign key → coupons.coupon_id — NOT NULL
- is_used — BOOLEAN — NOT NULL
- downloaded_at — TIMESTAMP — NOT NULL
- expires_at — TIMESTAMP — NOT NULL
- used_at — TIMESTAMP
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
user_grades (member_grades)
- grade_id — BIGSERIAL — Primary key — NOT NULL
- grade_name — VARCHAR(50) — NOT NULL
- criteria_amount — INTEGER — NOT NULL
- reward_rate — NUMERIC(5,2) — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
user_location_logs
- location_log_id — BIGSERIAL — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- store_id — BIGINT — Foreign key → stores.store_id — NOT NULL
- zone_id — BIGINT — Foreign key → store_zones.zone_id
- grid_id — BIGINT — Foreign key → grids.grid_id — NOT NULL
- entered_at — TIMESTAMP — NOT NULL
- exited_at — TIMESTAMP
- stay_duration — INTEGER
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
user_preferred_categories
- user_preferred_category_id — BIGSERIAL — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- category_id — BIGINT — Foreign key → categories.category_id — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
user_shopping_styles
- user_shopping_style_id — BIGSERIAL — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- shopping_style_id — BIGINT — Foreign key → shopping_styles.shopping_style_id — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
users
- user_id — BIGSERIAL — Primary key — NOT NULL
- email — VARCHAR(255)
- password — VARCHAR(255)
- name — VARCHAR(50) — NOT NULL
- phone_number — VARCHAR(30)
- birth_date — DATE
- gender — VARCHAR(20)
- role — VARCHAR(30) — NOT NULL
- grade_id — BIGINT — Foreign key → user_grades.grade_id
- reward — double — NOT NULL
- purchase_amount — long — NOT NULL
- is_first_login — BOOLEAN — NOT NULL
- deleted_at — TIMESTAMP
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL