CREATE TABLE `services` (
  `id` INT AUTO_INCREMENT PRIMARY KEY,
  `user_id`BIGINT NOT NULL,
  `chat_id` INT NOT NULL,
  `type_id` INT NOT NULL,
  `category` VARCHAR(64),    
  `schedule` VARCHAR(50),
  `country_id` INT NOT NULL,  
  `city_id` INT NOT NULL,  
  `additional_info` VARCHAR(255) DEFAULT NULL,  
  `price_type` VARCHAR(50) DEFAULT NULL,
  `price_value` INT NOT NULL DEFAULT 0,  
  `is_bot` BOOLEAN NOT NULL DEFAULT FALSE,
  `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

ALTER TABLE `services`
ADD COLUMN `rating` DECIMAL(3, 2) DEFAULT NULL;

INSERT INTO `services` 
(`user_id`, `chat_id`, `type_id`, `category`, `schedule`, `country_id`, `city_id`, 
`additional_info`, `price_type`, `price_value`, `is_bot`, `rating`) 
VALUES
(5464567, 7657656, 1234567, 'nanny', 'evening', 8234567, 9234567,
'Available for evening childcare, experienced with infants', 'hourly', 25, false, 4.85),

(6234567, 8234567, 2345678, 'tutor', 'morning', 7234567, 8234567,
'Mathematics and Science tutor for elementary students', 'hourly', 30, false, 4.92),

(7234567, 9234567, 3456789, 'babysitter', 'full-day', 6234567, 7234567,
'Full-day care available, first aid certified', 'monthly', 2500, false, 4.75),

(8234567, 1234567, 4567890, 'nanny', 'partially', 5234567, 6234567,
'Specializing in special needs care', 'hourly', 35, false, 4.88),

(9234567, 2345678, 5678901, 'tutor', 'evening', 4234567, 5234567,
'Language and music lessons for all ages', 'hourly', 28, false, 4.90);

/*
{
  "status": "success",
  "data": {
    "items": [
      {
        "id": 1,
        "user_id": "5464567",
        "chat_id": 7657656,
        "type_id": 1234567,
        "category": "nanny",
        "schedule": "evening",
        "country_id": 8234567,
        "city_id": 9234567,
        "additional_info": "Available for evening childcare, experienced with infants",
        "price_type": "hourly",
        "price_value": 25,
        "is_bot": false,
        "rating": 4.85,
        "created_at": "2025-09-10T10:00:00Z",
        "updated_at": "2025-09-10T10:00:00Z"
      },
      {
        "id": 2,
        "user_id": "6234567",
        "chat_id": 8234567,
        "type_id": 2345678,
        "category": "tutor",
        "schedule": "morning",
        "country_id": 7234567,
        "city_id": 8234567,
        "additional_info": "Mathematics and Science tutor for elementary students",
        "price_type": "hourly",
        "price_value": 30,
        "is_bot": false,
        "rating": 4.92,
        "created_at": "2025-09-10T10:00:00Z",
        "updated_at": "2025-09-10T10:00:00Z"
      },
      {
        "id": 3,
        "user_id": "7234567",
        "chat_id": 9234567,
        "type_id": 3456789,
        "category": "babysitter",
        "schedule": "full-day",
        "country_id": 6234567,
        "city_id": 7234567,
        "additional_info": "Full-day care available, first aid certified",
        "price_type": "monthly",
        "price_value": 2500,
        "is_bot": false,
        "rating": 4.75,
        "created_at": "2025-09-10T10:00:00Z",
        "updated_at": "2025-09-10T10:00:00Z"
      }
    ],
    "pagination": {
      "total": 5,
      "page": 1,
      "limit": 3,
      "hasMore": true
    }
  }
}
*/