-
-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE REQUEST] Premium plan #205
Labels
Comments
DB scheme : vip_users = unzipper_db["vip_users"]
user_id: {int} The user ID
subscription: {date} When the subscription starts
ends: {date} When the subscription ends
used: {str} [paypal, telegram, sponsor, bmac] Which platform had been used
billed: {str} [monthly, yearly] At which frequency the user is billed
early: {bool} Is the user a early supporter (can be obtained only the first 3 months)
donator: {bool} Is the user also a donator
started: {date} When does the user ever started a subscription
successful: {int} How many successful payments had been done
gap: {bool} Is there been any gap between payments
gifted: {bool} If the user had been gifted a Premium plan (enjoy discounts)
referral: {str} Your referral code (enjoy discounts x2) encoded using base58check
lifetime: {bool} A special perk that only few people can have date being : datetime.datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ') referral being : import base58check
uid = 854158484
print("base = ", uid)
encoded = base58check.b58encode(str(uid).encode("ascii"))
print("round 1 = ", encoded.decode("ascii"))
encoded = base58check.b58encode(encoded)
print("round 2 = ", encoded.decode("ascii"))
decoded = base58check.b58decode(encoded)
print("round 1 = ", decoded.decode("ascii"))
decoded = base58check.b58decode(decoded)
print("round 2 = ", int(decoded.decode("ascii")))
|
referral simplified to : import base58check
def get_referral_code(uid):
return base58check.b58encode(base58check.b58encode(str(uid).encode("ascii"))).decode("ascii")
def get_referral_uid(referral_code):
return int(base58check.b58decode(base58check.b58decode(referral_code).decode("ascii")).decode("ascii")) |
use |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Planned Features :
Process several taskstoo complexThe text was updated successfully, but these errors were encountered: