CREATE TABLE User (
                      Id CHAR(16) NOT NULL,
                      Username VARCHAR(255) NOT NULL,
                      Email VARCHAR(255) NOT NULL,
                      PasswordHash VARCHAR(255) NOT NULL,
                      PasswordSalt VARCHAR(255) NOT NULL,
                      CreatedDate DATETIME NOT NULL,
                      UpdatedDate DATETIME NOT NULL,
                      PRIMARY KEY (Id),
                      UNIQUE KEY (Username),
                      UNIQUE KEY (Email)
);

DROP TABLE Annotation;
DROP TABLE Media;
CREATE TABLE Media (
                       Id CHAR(16) NOT NULL,
                       Path VARCHAR(255) NOT NULL,
                       AnnotatorId CHAR(16) NULL,
                       Status INT NOT NULL, -- replace with actual enum values
                       CreatedDate DATETIME NOT NULL,
                       PRIMARY KEY (Id),
                       FOREIGN KEY (AnnotatorId) REFERENCES User(Id)
);

CREATE TABLE Annotation (
                            Id CHAR(16) NOT NULL,
                            MediaId CHAR(16) NOT NULL,
                            ImagePath VARCHAR(255) NOT NULL,
                            LabelPath VARCHAR(255) NOT NULL,
                            CreatedDate DATETIME NOT NULL,
                            PRIMARY KEY (Id),
                            FOREIGN KEY (MediaId) REFERENCES Media(Id)
);
