Propostas
0 rows where seller_id = 1 sorted by created_at descending
This data as json
0 records
CREATE TABLE proposal (
proposal_id INTEGER PRIMARY KEY AUTOINCREMENT,
conversation_id INTEGER NOT NULL REFERENCES conversation(conversation_id),
seller_id INTEGER NOT NULL REFERENCES seller(seller_id),
customer_id INTEGER NOT NULL REFERENCES customer(customer_id),
status TEXT NOT NULL DEFAULT 'draft',
total_cents INTEGER NOT NULL DEFAULT 0,
discount_cents INTEGER NOT NULL DEFAULT 0,
shipping_cents INTEGER NOT NULL DEFAULT 0,
payment_terms TEXT NOT NULL DEFAULT '{}',
notes TEXT,
valid_until TEXT,
sent_at TEXT,
responded_at TEXT,
created_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%SZ', 'now')),
updated_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%SZ', 'now')),
CHECK (status IN ('draft', 'sent', 'accepted', 'declined', 'expired'))
);
CREATE INDEX idx_proposal_conversation ON proposal(conversation_id);
CREATE INDEX idx_proposal_status ON proposal(status);