-
Notifications
You must be signed in to change notification settings - Fork 0
/
model.py
74 lines (54 loc) · 1.44 KB
/
model.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
class User():
def __init__(self):
self.conn = sqlite3.connect('rest_test.db')
def register(username,email,password):
c = conn.cursor()
c.execute("INSERT INTO user (name,password,email,created) VALUES ('"+username+"','"+password+"','"+email+"','2006-01-05')")
conn.commit()
def get_user(username,password):
sql = "SELECT * FROM user where name='"+username+"' and password = '"+password+"'"
c = conn.cursor()
user = c.execute(sql).fetchall()
if len(user) == 1:
return True,user
else:
return True,user
class Merchant():
def __init__(self):
pass
def register(self):
pass
class Brand():
def __init__(self):
pass
def create(self):
pass
def assign(self):
pass
class Outlet():
def __init__(self):
pass
def create(self):
pass
def assign(self):
pass
class Offer():
def __init__(self):
pass
def create(self):
pass
def edit(self):
pass
def checkExpiry(self):
pass
def viewedby(self):
pass
def likedby(self):
pass
def redeemedby(self):
pass
class OffersFilter():
def __init__(self):
pass
def by(self):
pass