CREATE TABLE stories (
    id SERIAL PRIMARY KEY,
    title VARCHAR(200) NOT NULL,
    description TEXT,
    priority VARCHAR(10) DEFAULT 'medium'
        CHECK (priority IN ('low', 'medium', 'high')),
    status VARCHAR(20) DEFAULT 'todo'
        CHECK (status IN ('todo', 'in-progress', 'done')),
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

INSERT INTO stories (title, description, priority, status) VALUES
    ('Setup project', 'Initialize the repository and install dependencies', 'high', 'done'),
    ('Design database schema', 'Define tables for user stories', 'high', 'in-progress'),
    ('Build REST API', 'Create CRUD endpoints for stories', 'medium', 'todo');
