CCLIME
Tables (25)
LOGIN_ATTEMPT (Attempt)
- attempt_id — INT — Primary key — NOT NULL — ID
- adminId (admin_id) — INT — Admin ID
- timestamp — DATETIME — NOT NULL — Login time
- status — ENUM — NOT NULL — Login status
- ip_address — VARCHAR(255) — NOT NULL — User IP address
TB_ADMIN (Admin)
- admin_id — INT — Primary key — NOT NULL — Admin Id
- storeId (store_id) — INT — Foreign key → TB_STORE.storeId — Store ID
- userName (user_name) — VARCHAR(50) — NOT NULL — Username
- password — VARCHAR(255) — NOT NULL — Password (encrypted)
- phone — VARCHAR(20) — Phone
- email — VARCHAR(50) — Email
- role — ENUM — ADMIN, STORE
- lastlogin (last_login) — DATETIME — Last login time
- createdAt (created_at) — DATETIME — NOT NULL
- updatedAt (updated_at) — DATETIME
TB_ANNOUNCEMENT (Announcement)
- announcementId (announcement_id) — INIT — Primary key — NOT NULL — Notification ID
- title — VARCHAR(255) — NOT NULL — Notification Title
- content — VARCHAR(MAX) — NOT NULL — Notification content
- createdAt (created_at) — DATETIME — NOT NULL — Notification creation time
TB_COUPON (Coupon)
- couponId (coupon_id) — INT — Primary key — NOT NULL — Coupon ID
- Field
TB_CUSTOMER (Customer)
- customerId (customer_id) — INT — Primary key — NOT NULL — Customer ID
- name — VARCHAR(50) — NOT NULL — name
- phone — VARCHAR(50) — NOT NULL — phone
- email — VARCHAR(50) — email
- total_reservations — INT — NOT NULL
- total_spent — INT — NOT NULL
- total_services — INT — NOT NULL
- IsNewCustomer (is_new_customer) — TINYINT(1) — NOT NULL
- preferredLocation (preferred_location) — VARCHAR(255) — NOT NULL — Preferred location
- profileImage (profile_image) — VARCHAR(255)
- dateOfBirth (date_of_birth) — DATETIME — NOT NULL
- address — VARCHAR(255) — NOT NULL
- source — VARCHAR(MAX)
- isPrivacyConsent (is_privacy_consent) — TINYINT(1) — NOT NULL
- isPrecautionChecked (is_precaution_checked) — TINYINT(1) — NOT NULL
- createdAt (created_at) — DATETIME — NOT NULL
- updatedAt (updated_at) — DATETIME
TB_CUSTOMER_HISTORY (Customer_History)
- historyId (history_id) — INT — Primary key — NOT NULL — History ID
- customerId (customer_id) — INT — Foreign key → TB_CUSTOMER.customerId — NOT NULL — Customer ID
- reservationsId — INT — Reservations ID
- totalAmount (total_amount) — INT — Total amount
- last_visit_date — DATETIME — NOT NULL — Last visit date
- last_store_visited — INT — Store ID
- last_reservation_date — DATETIME — Last reservation date
- last_service (last_service_date) — DATETIME — last service Date
- Field
TB_CUSTOMER_MEMO (Customer_Memo)
- memoId (memo_id) — INT — Primary key — NOT NULL — Employee ID
- customerId (customer_id) — INT — Foreign key → TB_CUSTOMER.customerId — Customer ID
- employeeId — INT — NOT NULL
- createdAt — DATETIME — NOT NULL
- updatedAt — DATETIME
- Dry — TINYINT(1) — 건성
- Oily — TINYINT(1) — 지성
- Combination — TINYINT(1) — 복합성
- Sensitive — TINYINT(1) — 민감성
- Acne-prone — TINYINT(1) — 여드름성
- Wrinkles — TINYINT(1) — 주름
- Reduced Elasticity — TINYINT(1) — NOT NULL — 탄력 저하
- large pores — TINYINT(1) — 홍조
- Redness — TINYINT(1) — 홍조
- Pigmentation — TINYINT(1) — 색소 침착
- Enlarged Pores — TINYINT(1) — 모공 확대
- Problem Skin — TINYINT(1) — 문제성 피부
- OtherConcerns — TINYINT(1) — 기타
- Oval — TINYINT(1) — 계란형
- Inverted Triangle — TINYINT(1) — 역삼각형
- Round — TINYINT(1) — 둥근형
- Heart-shaped — TINYINT(1) — 하트형
- Long Face — TINYINT(1) — 긴 얼굴형
- Peanut-shaped — TINYINT(1) — 땅콩형
- Square Face — TINYINT(1) — 각진 얼굴형
- Pop out — TINYINT(1)
- cellulose body — TINYINT(1)
- Yellow upper body — TINYINT(1)
- apple hips — TINYINT(1)
- Field4 — TINYINT(1)
- Field5 — TINYINT(1)
TB_EMPLOYEE_PERFORMANCE (Employee_Performance)
- performanceId (Performance_id) — INT — Primary key — NOT NULL
- employeeId (employee_id) — INT — Foreign key → TB_Employee.employeeId — NOT NULL — Employee ID
- revenue — INT — NOT NULL
- deduction — INT — NOT NULL
- homeCareSales (home_care_sales) — INT — NOT NULL
- createdAt (created_at) — DATETIME — NOT NULL
TB_Employee (Employee)
- employeeId (employee_id) — INT — Primary key — NOT NULL — Employee ID
- storeId (store_id) — INT — Foreign key → TB_STORE.storeId — NOT NULL — Store ID
- photo — VARCHAR(50) — NOT NULL — Photo
- name — VARCHAR(50) — NOT NULL — Name
- position — ENUM — NOT NULL — Beautician/Manager
- phone — INT — NOT NULL — Phone
- activeStatus (active_status) — ENUM — NOT NULL — ACTIVE, INACTIVE
- groupPermission (group_permission) — ENUM — NOT NULL
- createdAt (created_at) — DATETIME — NOT NULL
- updatedAt (update_at) — DATETIME
- deletedAt (deleted_at) — DATETIME
TB_ORDER (Order)
- orderId (order_Id) — INIT — Primary key — NOT NULL — OrderID
- customerId (customer_id) — INT — Foreign key → TB_CUSTOMER.customerId — NOT NULL — Customer ID
- orderDate (order_date) — DATETIME — NOT NULL — Order Date
- totalAmount (total_amount) — INT — NOT NULL — Total Amount
- discountAmount (discount_amount) — INIT — NOT NULL — Discount Amount
- finalAmount (final_amount) — INT — NOT NULL — Final Amount
- paymentStatus (payment_status) — ENUM — NOT NULL — Paid, Pending, Error
- orderStatus (order_status) — ENUM — NOT NULL — Completed, Incomplete
TB_ORDER_ITEM (OrderItem)
- orderItemId (order_item_id) — INT — Primary key — NOT NULL — Order Item ID
- orderId (order_Id) — INIT — Foreign key → TB_ORDER.orderId — NOT NULL — OrderID
- productId (product_id) — INT — Foreign key → TB_PRODUCT.productId — NOT NULL — Product ID
- quantity — INT — NOT NULL — Number of products
- unitPrice (unit_price) — INT — NOT NULL — Unit price
- totalPrice (total_price) — INT — NOT NULL — Total (Quantity x Unit Price)
TB_PRODUCT (Product)
- productId (product_id) — INT — Primary key — NOT NULL — Product ID
- categoryId (category_id) — INT — Foreign key → TB_PRODUCT_CATEGORY.categoryId — NOT NULL — Product categories
- productName (product_name) — VARCHAR(255) — NOT NULL — Product name
- price — INT — NOT NULL — Product price
- stock — INT — NOT NULL — Inventory quantity
- stockInToday (stock_in_today) — INT — NOT NULL — Stock in today
- stockOutToday (stock_out_today) — INT — NOT NULL — Stock out today
- threshold — INT — NOT NULL — Inventory warning threshold
- note — VARCHAR(MAX)
TB_PRODUCT_CATEGORY (Product_Category)
- categoryId (category_id) — INT — Primary key — NOT NULL — Product categories
- category_name — VARCHAR(255) — NOT NULL — Category name
TB_PROGRAM (Program)
- programId (program_id) — INT — Primary key — NOT NULL — Program ID
- programName (program_name) — VARCHAR(MAX) — NOT NULL
TB_RESERVATIONS (Reservations)
- reservationsId (reservations_id) — INT — Primary key — NOT NULL — Reservations ID
- customerId (customer_id) — INT — Foreign key → TB_CUSTOMER.customerId — NOT NULL — Customer ID
- storeId (store_id) — INT — Foreign key → TB_STORE.storeId — NOT NULL — Store ID
- programId (program_id) — INT — Foreign key → TB_PROGRAM.programId — NOT NULL — Program ID
- reservationStatus (status) — ENUM — NOT NULL — New, Confirmed, Canceled, Pending
- reservationDate (reservation_date) — DATETIME — NOT NULL — Date and time of booking
- reservationsType (reservations_type) — ENUM — Reservations type
- startTime (start_time) — DATETIME — NOT NULL — Start time
- endTime (end_time) — DATETIME — NOT NULL — End Time
- isWaiting (is_waiting) — TINYINT(1) — NOT NULL — true(waitlist)/false(reservation)
- color — VARCHAR(50) — Colors for booking cards
- requestNote (request_note) — VARCHAR(MAX) — Additional requests from customers
- adminNote (admin_note) — VARCHAR(MAX) — Notes from employee
- cancelReason (cancel_reason) — VARCHAR(MAX) — Reasons why customers cancel bookings
- bedTable (bed_table) — ENUM — NOT NULL — Bed/Table
- isMale — TINYINT(1) — NOT NULL — 남성
- isParking — TINYINT(1) — NOT NULL — 주차
- isWaiting — TINYINT(1) — NOT NULL — 대기
- isPrivateRoom — TINYINT(1) — NOT NULL — 개인룸
- isOther — TINYINT(1) — NOT NULL — 기타
- isMachineCellulow — TINYINT(1) — NOT NULL — 기계(셀룰로우)
- isMachineFaceTraining — TINYINT(1) — NOT NULL — 기계(페이스트레이닝)
- isMachineFacelineLifting — TINYINT(1) — NOT NULL — 기계(페이스라인 리프팅)
- createdAt (created_at) — DATETIME — NOT NULL
- updatedAt (updated_at) — DATETIME
TB_RESERVATIONS_BLOCK (Reservations_Block)
- blockId (block_id) — INT — Primary key — NOT NULL — Block ID
- storeId (store_id) — INT — Foreign key → TB_STORE.storeId — NOT NULL — Store ID
- employeeId (employee_id) — INT — Foreign key → TB_Employee.employeeId — NOT NULL — Employee ID
- blockDate (block_date) — DATETIME — NOT NULL — Ban date
- startTime (start_time) — DATETIME — NOT NULL — Start time block
- endTime (end_time) — DATETIME — NOT NULL — End time block
- reason — VARCHAR(MAX) — NOT NULL — Reason block
- note — VARCHAR(MAX)
- createdAt (created_at) — DATETIME — NOT NULL
- updatedAt (updated_at) — DATETIME
- deletedAt (deleted_at) — DATETIME
TB_RESERVATION_STAFF (Reservations_Employee)
- employeeId (employee_id) — INT — Foreign key → TB_Employee.employeeId — NOT NULL — ID
- reservationsId (reservations_id) — INT — Foreign key → TB_RESERVATIONS.reservationsId — NOT NULL — ID
- role — ENUM — NOT NULL — MAIN/SUB
TB_SALES (Sales)
- salesId (sales_id) — INT — Primary key — NOT NULL — Sales ID
- saleDate (sale_date) — DATETIME — NOT NULL — Sale date
- revenue — INT — NOT NULL — Total revenue
- deduction — INT — NOT NULL — Deduction
- homeCareSales (home_care_sales) — INT — NOT NULL — Home care product revenue
- paymentMethod (payment_method) — ENUM — NOT NULL — Payment method
- cost — INT — NOT NULL
- note — VARCHAR(MAX)
- employeeId (employee_id) — INT — NOT NULL — Employee ID
- customerId (customer_id) — INT — NOT NULL — Customer ID
- serviceId (service_id) — INT — NOT NULL — Service ID
TB_SERVICE (Service)
- serviceId (service_id) — INT — Primary key — NOT NULL — Service ID
- storeId (store_id) — INT — Foreign key → TB_STORE.storeId — NOT NULL — Store ID
- serviceName (service_name) — VARCHAR(255) — NOT NULL — Service name
- type — ENUM — NOT NULL — Beauty, Health Care
- price — INT — NOT NULL
- description — VARCHAR(255) — Description
TB_SMS_NOTIFICATION (SMS_Notification)
- smsId (sms_id) — INT — Primary key — NOT NULL
- reservationsId (reservations_id) — INT — Reservations ID
- SendTime — DATETIME — NOT NULL
- SendTiming — DATETIME — NOT NULL
- IsSent — TINYINT(1) — NOT NULL
- value — VARCHAR(255) — value sms
- CreatedAt — DATETIME — NOT NULL
TB_STOCK_MOVEMENT (Stock_Movement)
- movementId (movement_id) — INT — Primary key — NOT NULL — Movement ID
- productId (product_id) — INT — Foreign key → TB_PRODUCT.productId — NOT NULL — Product ID
- employeeId (employee_id) — INT — Foreign key → TB_Employee.employeeId — NOT NULL — Employee ID
- movementDate (movement_date) — DATETIME — NOT NULL — Date of import/export
- type — ENUM — NOT NULL — IN, OUT
- supplier — VARCHAR(255) — Supplier
- unitPrice (unit_price) — INT — NOT NULL — Unit price
- quantity — INT — NOT NULL — Quantity
- subtotal — INT — NOT NULL — Amount
- total — INT — NOT NULL — Total amount
- remainingStock — INIT — NOT NULL — Remaining inventory after transaction
TB_STORE (Store)
- storeId (store_id) — INT — Primary key — NOT NULL — Store ID
- storeName (store_Name) — VARCHAR(255) — NOT NULL — Store name
- location — VARCHAR(255) — NOT NULL — Location
TB_Transaction_History (Transaction)
- transactionId (transaction_id) — INT — Primary key — NOT NULL — Transaction ID
- salesId (sales_id) — INT — Foreign key → TB_SALES.salesId — NOT NULL — Sales ID
- paymentMethod (payment_method) — ENUM — NOT NULL — Payment method
- totalAmount (total_amount) — INT — NOT NULL — Total payment amount
- discount — INT — NOT NULL — Discount amount
- pointsEarned (points_earned) — INT — NOT NULL — Points accumulated
- status — ENUM — NOT NULL — Success/Failure
- transactionDate (transaction_date) — DATETIME — NOT NULL — Transaction date
TB_VIP_PASS (Vip_Pass)
- passId (pass_id) — INT — Primary key — NOT NULL — Vip pass ID
- customerId (customer_id) — INT — Foreign key → TB_CUSTOMER.customerId — NOT NULL — Customer ID
- passName (pass_name) — VARCHAR(255) — NOT NULL
- expirationDate (expiration_date) — DATETIME — NOT NULL
TB_WORKDAY_MANAGEMENT (Workday_Management)
- workdayId (workday_id) — INT — Primary key — NOT NULL
- employeeId (employee_id) — INT — Foreign key → TB_Employee.employeeId — NOT NULL — Employee ID
- date — DATETIME — NOT NULL
- start_time — DATETIME — NOT NULL
- end_time — DATETIME — NOT NULL
- work_type — ENUM — NOT NULL
- createdAt (created_at) — DATETIME — NOT NULL
- updatedAt (update_at) — DATETIME