forked from robinbattle/appinventororg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
datastore.py
110 lines (91 loc) · 3.66 KB
/
datastore.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
from google.appengine.ext import db
#### Datastore Classes ####
class App(db.Model):
number = db.IntegerProperty()
title = db.StringProperty()
appId = db.StringProperty()
heroHeader = db.StringProperty()
heroCopy = db.TextProperty()
pdfChapter = db.BooleanProperty(default=True)
conceptualLink = db.BooleanProperty(default=True)
manyMold = db.StringProperty()
version = db.StringProperty(default="1")
timestamp = db.DateTimeProperty(auto_now=True)
webTutorial = db.BooleanProperty(default=False)
webTutorialLink = db.StringProperty()
# for the "Build It" section of a generated app page
class Step(db.Model):
# appId = db.IntegerProperty() # specifies app the step belongs to
appId = db.StringProperty() # temporary identifier | TODO: remove this
number = db.IntegerProperty()
header = db.StringProperty()
copy = db.TextProperty()
videoPath = db.StringProperty()
fullscreenPath = db.StringProperty()
timestamp = db.DateTimeProperty(auto_now=True)
class Concept(db.Model):
# appId = db.IntegerProperty() # specifies app the step belongs to
appId = db.StringProperty() # temporary identifier | TODO: remove this
number = db.IntegerProperty()
header = db.StringProperty()
copy = db.TextProperty()
blockPath = db.StringProperty()
videoPath = db.StringProperty()
fullscreenPath = db.StringProperty()
timestamp = db.DateTimeProperty(auto_now=True)
class Custom(db.Model):
# appId = db.IntegerProperty() # specifies app the step belongs to
appId = db.StringProperty() # temporary identifier | TODO: remove this
number = db.IntegerProperty()
header = db.StringProperty()
copy = db.TextProperty()
blockPath = db.StringProperty()
videoPath = db.StringProperty()
fullscreenPath = db.StringProperty()
timestamp = db.DateTimeProperty(auto_now=True)
class Account(db.Model):
user = db.UserProperty()
profilePicture = db.BlobProperty()
firstName = db.StringProperty(default="")
lastName = db.StringProperty(default="")
location = db.StringProperty(default="")
organization = db.StringProperty(default="")
ifEducator = db.BooleanProperty(default=False)
educationLevel = db.StringProperty()
introductionLink = db.StringProperty()
timestamp = db.DateTimeProperty(auto_now=True)
latitude = db.FloatProperty()
longitude = db.FloatProperty()
displayName= db.StringProperty()
class DefaultAvatarImage(db.Model):
title = db.StringProperty()
picture = db.BlobProperty(default=None)
class Position(db.Model):
latitude = db.FloatProperty()
longitude = db.FloatProperty()
class Comment(db.Model):
submitter = db.ReferenceProperty(collection_name='submitter')
timestamp = db.DateTimeProperty(auto_now=True)
content = db.StringProperty()
appId = db.StringProperty()
replyFrom = db.ReferenceProperty(collection_name='replyFrom')
replyTo = db.ReferenceProperty(collection_name='replyTo')
class Tutorial(db.Model):
number = db.IntegerProperty()
title = db.StringProperty()
tutorialId = db.StringProperty()
heroHeader = db.StringProperty()
heroCopy = db.TextProperty()
timestamp = db.DateTimeProperty(auto_now=True)
class TutorialStep(db.Model):
# appId = db.IntegerProperty() # specifies app the step belongs to
tutorialId = db.StringProperty() # temporary identifier | TODO: remove this
number = db.IntegerProperty()
header = db.StringProperty()
copy = db.TextProperty()
tutorialLink = db.StringProperty()
timestamp = db.DateTimeProperty(auto_now=True)
# for the "Conceptualize It" section of a generated app page
# class Concept(db.Model):
# for the "Customize It" section of a generated app page
# class Custom(db.Model):