refactor(db): refresh products entity and schema_extras.sql
zhenyi committed
Modified lib/db/products/products.rs lib/db/products/products.rs +2 −0 View lib/db/products/products.rs
@@ -37,6 +37,8 @@
3737 pub is_active: bool,
3838 #[sea_orm(default_value = "0")]
3939 pub install_count: i64,
40 pub price: Option<i64>,
41 pub price_currency: Option<String>,
4042 pub created_at: OffsetDateTime,
4143 pub updated_at: OffsetDateTime,
4244 #[sea_orm(belongs_to, from = "space_id", to = "id")]
Modified lib/db/schema_extras.sql lib/db/schema_extras.sql +7 −1 View lib/db/schema_extras.sql
@@ -108,4 +108,10 @@
108108 ALTER TABLE project_links
109109 ADD CONSTRAINT project_links_not_self CHECK (project_id <> related_project_id);
110110 END IF;
111END $$;
No newline at end of file
111END $$;
112
113-- ---------------------------------------------------------------------------
114-- Payment composite indexes (multi-column; entity attributes are single-column).
115-- ---------------------------------------------------------------------------
116CREATE INDEX IF NOT EXISTS idx_payment_transaction_ref ON payment_transaction (ref_type, ref_id);
117CREATE INDEX IF NOT EXISTS idx_payment_webhook_status_created ON payment_webhook_event (status, created_at);
No newline at end of file