DROP TABLE IF EXISTS public.generic_tasks;

CREATE TABLE public.generic_tasks (
    task_id uuid DEFAULT public.uuid_generate_v7() NOT NULL,
    module_id uuid,
    title character varying(255) NOT NULL,
    description text,
    assignee_id uuid,
    due_date date,
    hours numeric(10,2) DEFAULT NULL::numeric,
    priority character varying(20) DEFAULT 'medium'::character varying,
    status character varying(50) DEFAULT 'pending'::character varying,
    reference_table character varying(100) DEFAULT 'cases'::character varying,
    reference_id uuid,
    task_config jsonb,
    org_id uuid,
    branch_id uuid,
    isdeleted boolean DEFAULT false NOT NULL,
    updatedat timestamp with time zone DEFAULT now() NOT NULL
);

