CREATE TABLE IF NOT EXISTS main_receipts (
    id SERIAL PRIMARY KEY,
    receipt_id VARCHAR (32) NOT NULL,
    receipt_status VARCHAR (64) NOT NULL,
    date_submitted TIMESTAMP NOT NULL,
    submitted_by INTEGER NOT NULL,
    vendor_id INTEGER,
    files JSONB,
    UNIQUE(receipt_id),
    CONSTRAINT fk_vendor
        FOREIGN KEY(vendor_id) 
        REFERENCES main_vendors(id)
);