Add SMS templates, prepaid IRT billing, and advertising shortcode 9000590009.
Charge ceil(len/64)*400 IRT per recipient across OTP, customer, and partner SMS; seed new businesses with 500k IRT; default partner sends to the advertising line. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
4623061a4f
commit
4a1d60dbef
@@ -0,0 +1,21 @@
|
||||
-- SMS template verification workflow: free | pending | verified
|
||||
|
||||
ALTER TABLE sms_templates
|
||||
ADD COLUMN IF NOT EXISTS verification_status VARCHAR(32) NOT NULL DEFAULT 'free';
|
||||
|
||||
UPDATE sms_templates
|
||||
SET verification_status = 'verified'
|
||||
WHERE is_verified = TRUE;
|
||||
|
||||
ALTER TABLE sms_templates
|
||||
DROP CONSTRAINT IF EXISTS sms_templates_verification_status_check;
|
||||
|
||||
ALTER TABLE sms_templates
|
||||
ADD CONSTRAINT sms_templates_verification_status_check
|
||||
CHECK (verification_status IN ('free', 'pending', 'verified'));
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_sms_templates_verification_status
|
||||
ON sms_templates (verification_status);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_sms_templates_business_status
|
||||
ON sms_templates (business_id, verification_status);
|
||||
Reference in New Issue
Block a user