@@ -103,45 +103,11 @@ model payment_releases {
103103  payment_method                payment_method                  @relation (fields : [payment_method_id ] , references : [payment_method_id ] , onDelete : NoAction , onUpdate : NoAction ) 
104104} 
105105
106- model  payoneer_payment_method  {
107-   id                      Int                   @id @default (autoincrement () 
108-   user_payment_method_id  String ?                @db.Uuid  
109-   user_id                 String                @unique @db.VarChar (80 ) 
110-   payee_id                String                @db.VarChar (50 ) 
111-   payoneer_id             String ?               @db.VarChar (50 ) 
112-   user_payment_methods    user_payment_methods ?  @relation (fields : [user_payment_method_id ] , references : [id ] , onDelete : Cascade , onUpdate : NoAction , map : " fk_payoneer_user_payment_method " ) 
113- } 
114- 
115- model  paypal_payment_method  {
116-   id                      Int                   @id @default (autoincrement () 
117-   user_payment_method_id  String ?                @db.Uuid  
118-   user_id                 String                @unique @db.VarChar (80 ) 
119-   email                   String ?               @db.VarChar (150 ) 
120-   payer_id                String ?               @db.VarChar (50 ) 
121-   country_code            String ?               @db.VarChar (2 ) 
122-   user_payment_methods    user_payment_methods ?  @relation (fields : [user_payment_method_id ] , references : [id ] , onDelete : Cascade , onUpdate : NoAction , map : " fk_paypal_user_payment_method " ) 
123- } 
124- 
125- model  reward  {
126-   reward_id    String     @id @default (dbgenerated (" uuid_generate_v4 ()" )@db.Uuid  
127-   winnings_id  String     @db.Uuid  
128-   points       Int ?  
129-   title        String ?    @db.VarChar (255 ) 
130-   description  String ?  
131-   reference    Json ?  
132-   attributes   Json ?  
133-   created_at   DateTime ?  @default (now ()@db.Timestamp (6 ) 
134-   updated_at   DateTime ?  @default (now ()@db.Timestamp (6 ) 
135-   winnings     winnings   @relation (fields : [winnings_id ] , references : [winning_id ] , onDelete : NoAction , onUpdate : NoAction ) 
136- } 
137- 
138106model  user_payment_methods  {
139107  id                       String                     @id @default (dbgenerated (" uuid_generate_v4 ()" )@db.Uuid  
140108  user_id                  String                     @db.VarChar (80 ) 
141109  payment_method_id        Int  
142110  status                   payment_method_status ?     @default (OTP_PENDING ) 
143-   payoneer_payment_method  payoneer_payment_method []  
144-   paypal_payment_method    paypal_payment_method []  
145111  trolley_payment_method   trolley_recipient []  
146112  payment_method           payment_method             @relation (fields : [payment_method_id ] , references : [payment_method_id ] , onDelete : NoAction , onUpdate : NoAction , map : " fk_user_payment_method " ) 
147113
@@ -172,7 +138,6 @@ model winnings {
172138  updated_at   DateTime ?           @default (now ()@db.Timestamp (6 ) 
173139  audit        audit []  
174140  payment      payment []  
175-   reward       reward []  
176141  origin       origin ?             @relation (fields : [origin_id ] , references : [origin_id ] , onDelete : NoAction , onUpdate : NoAction ) 
177142
178143  @@index ([category , created_at (sort : Desc ) , map : " idx_winnings_category_created_at " ) 
@@ -223,6 +188,13 @@ model trolley_recipient_payment_method {
223188  trolley_recipient    trolley_recipient  @relation (fields : [trolley_recipient_id ] , references : [id ] , onDelete : Cascade , onUpdate : NoAction , map : " fk_trolley_recipient_trolley_recipient_payment_method " ) 
224189} 
225190
191+ model  challenge_lock  {
192+   id  Int  @id @default (autoincrement () 
193+   external_id   String             @unique @db.VarChar (255 ) 
194+   lock_time     DateTime        @default (now ()@db.Timestamp (6 ) 
195+   error         String ?             @db.Text  
196+ } 
197+ 
226198enum  verification_status  {
227199  ACTIVE  
228200  INACTIVE  
0 commit comments