agent-workspace / supabase /tables /projects.sql
luom2645's picture
Add files using upload-large-folder tool
62e1b50 verified
Raw History Blame Contribute Delete
638 Bytes
CREATE TABLE projects (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
user_id UUID NOT NULL,
title TEXT NOT NULL,
description TEXT,
genre TEXT,
tags TEXT[] DEFAULT '{}',
status TEXT DEFAULT 'draft' CHECK (status IN ('draft',
'in_progress',
'completed',
'published',
'archived')),
word_count INTEGER DEFAULT 0,
target_word_count INTEGER,
cover_image_url TEXT,
language TEXT DEFAULT 'zh',
is_public BOOLEAN DEFAULT false,
created_at TIMESTAMP WITH TIME ZONE DEFAULT timezone('utc',
now()),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT timezone('utc',
now())
);