ソースを参照

update some details

Ray Lee 6 年 前
コミット
52c18d8d65
1 ファイル変更13 行追加12 行削除
  1. 13 12
      Sendy_Spec.md

+ 13 - 12
Sendy_Spec.md

@@ -68,21 +68,23 @@ belongs_to :kdan_product
 ~~~ruby
 {
   kdan_id:integer,
-  pack_id:integer,
-  stauts:[free_trial, active, expired, refund, cancel]
+  kdan_product_id:integer,
+  stauts:[free_trial, subscribed, expired, refund, cancel]
 }
 ~~~
 * free\_trial: Subscription is in free trial period.
-* active: Subscription is active now.
-* expired: Subscription is expired now.
+* subscribed: Subscription is active now.
+* expired: Only for customer service/creative store offered products 
 * cancel: Auto-renew canceled but current subscription not changed.
 * refund: Auto-renew canceled and current subscription rollbacked.
-* status priority: **active \> free\_trial \> expired \> cancel \> refund**
+* status priority based on receipts.purchase_date
 
 ### Schedule.rb
 * update KdanPackSubscriptionStatus every 15m
-* select updated receipts in 15min
-* select expired receipts in 15min
+	* select kdan\_ids from kdan.updated_at in 15min
+	* select kdan\_ids from receipts.end\_of\_date in 15min
+	* distinct kdan\_ids
+	* cals\_pack\_subscription_status(kdan.receipts)
 
 ## CR System
 ### SendyMailList
@@ -92,15 +94,14 @@ belongs_to :kdan_product
   sendy_list_long_id:string,
   sendy_list_short_id:integer,
   select_criteria:json,
-  active_count:integer,
-  unsubscribed_count:integer,
-  bounced_count:integer,
-  bounced_soft_count:integer,
-  complaint_count:integer,
+  email_count:integer,
   sendy_delete_at:datetime,
 }
 ~~~
 
+* query from backup db: meber\_center and iap\_center 
+* sequel to insert sendy list and subscriber
+
 # Views
 ## CR System