@@ -39,7 +39,9 @@ impl Map {
39
39
users.passkey as `passkey: Passkey`,
40
40
users.can_download as `can_download: bool`,
41
41
CAST(COALESCE(SUM(peers.seeder = 1 AND peers.active = 1 AND peers.visible = 1), 0) AS UNSIGNED) as `num_seeding!: u32`,
42
- CAST(COALESCE(SUM(peers.seeder = 0 AND peers.active = 1 AND peers.visible = 1), 0) AS UNSIGNED) as `num_leeching!: u32`
42
+ CAST(COALESCE(SUM(peers.seeder = 0 AND peers.active = 1 AND peers.visible = 1), 0) AS UNSIGNED) as `num_leeching!: u32`,
43
+ users.is_donor as `is_donor: bool`,
44
+ users.is_lifetime as `is_lifetime: bool`
43
45
FROM
44
46
users
45
47
LEFT JOIN
@@ -70,6 +72,8 @@ impl Map {
70
72
num_leeching : user. num_leeching ,
71
73
receive_seed_list_rates : config. user_receive_seed_list_rate_limits . clone ( ) ,
72
74
receive_leech_list_rates : config. user_receive_leech_list_rate_limits . clone ( ) ,
75
+ is_donor : user. is_donor ,
76
+ is_lifetime : user. is_lifetime ,
73
77
} ,
74
78
) ;
75
79
}
@@ -102,6 +106,8 @@ impl Map {
102
106
can_download : user. can_download ,
103
107
num_seeding : user. num_seeding ,
104
108
num_leeching : user. num_leeching ,
109
+ is_donor : user. is_donor ,
110
+ is_lifetime : user. is_lifetime ,
105
111
receive_seed_list_rates,
106
112
receive_leech_list_rates,
107
113
} ,
@@ -166,6 +172,8 @@ pub struct DBImportUser {
166
172
pub can_download : bool ,
167
173
pub num_seeding : u32 ,
168
174
pub num_leeching : u32 ,
175
+ pub is_donor : bool ,
176
+ pub is_lifetime : bool ,
169
177
}
170
178
171
179
#[ derive( Clone , Deserialize , Serialize ) ]
@@ -176,6 +184,8 @@ pub struct User {
176
184
pub can_download : bool ,
177
185
pub num_seeding : u32 ,
178
186
pub num_leeching : u32 ,
187
+ pub is_donor : bool ,
188
+ pub is_lifetime : bool ,
179
189
pub receive_seed_list_rates : RateCollection ,
180
190
pub receive_leech_list_rates : RateCollection ,
181
191
}
@@ -188,6 +198,8 @@ pub struct APIInsertUser {
188
198
pub can_download : bool ,
189
199
pub num_seeding : u32 ,
190
200
pub num_leeching : u32 ,
201
+ pub is_donor : bool ,
202
+ pub is_lifetime : bool ,
191
203
}
192
204
193
205
#[ derive( Clone , Deserialize , Hash ) ]
0 commit comments