소스 검색

change some columen

Ray Lee 6 년 전
부모
커밋
327e63cc82
1개의 변경된 파일11개의 추가작업 그리고 17개의 파일을 삭제
  1. 11 17
      Sendy_Spec.md

+ 11 - 17
Sendy_Spec.md

@@ -37,7 +37,7 @@
 ## Member Center
 ### Member
 ~~~ruby
-add_column :members, :sendy_sub_status, enum: [:active, :unsubscribed, :bounced, :bounced_soft, :complaint]
+add_column :members, :sendy_status, enum: [:subscribe, :unsubscribed, :complaint, :bounced]
 ~~~
 ### Schedule.rb
 * update :sendy\_sub\_status every 15m
@@ -48,27 +48,21 @@ add_column :members, :sendy_sub_status, enum: [:active, :unsubscribed, :bounced,
 ~~~ruby
 has_many :subscription_status, class: 'KdanSubscriptionStatus'
 ~~~
-### Subscription
-~~~ruby
-has_many :status, class: 'KdanSubscriptionStatus'
-~~~
 ### KdanSubscriptionStatus
-* only apply to following packs
-  * Creativity 365
-  * ~~Creativity 365 Teacher & Student~~
-  * Document 365
-  * ~~Creativity 365 Education~~
-  * ~~Creativity 365 Business~~
-  * ~~Document 365 Volume Licensing~~
+* product.target
+* only apply to following targets
+	* Creativity 365
+	* Document 365
+* Exclude
+	* product.mass = true
 
 ~~~ruby
 belongs_to :kdan
-belongs_to :subscription
 ~~~
 ~~~ruby
 {
   kdan_id:integer,
-  subscription_id:integer,
+  target:string,
   stauts:[outsider, free_trial, subscribed, expired, refund, cancel]
 }
 ~~~
@@ -82,9 +76,9 @@ belongs_to :subscription
 
 ### Schedule.rb
 * update KdanPackSubscriptionStatus every 15m
-	* select kdan\_ids from kdan.updated_at in 15min
-	* select kdan\_ids from receipts.end\_of\_date in 15min
-	* distinct kdan\_ids
+	* select kdan\_ids from kdan.updated_at in 1 hour (group a)
+	* select kdan\_ids from receipts.end\_of\_date in 1 hour (group b)
+	* distinct kdan\_ids (group a + group b)
 	* cals\_pack\_subscription_status(kdan.receipts)
 
 ## CR System