CREATE TABLE IF NOT EXISTS user_ratings (
    id          INT(11)     NOT NULL AUTO_INCREMENT PRIMARY KEY,
    rater_id    INT(11)     NOT NULL COMMENT 'Celui qui note',
    rated_id    INT(11)     NOT NULL COMMENT 'Celui qui est noté',
    stars       TINYINT(1)  NOT NULL DEFAULT 3,
    comment     VARCHAR(255) DEFAULT NULL,
    created_at  TIMESTAMP   DEFAULT CURRENT_TIMESTAMP,
    updated_at  TIMESTAMP   DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    UNIQUE KEY unique_rating (rater_id, rated_id)
);
