#!/usr/bin/env python # # Copyright 2014 Jun Woo Park. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # from google.appengine.ext import ndb class SurveyData(ndb.Model): """Models an individual survey response.""" start_date = ndb.DateTimeProperty(auto_now_add=True) end_date = ndb.DateTimeProperty(auto_now_add=False) # 1 email_address = ndb.StringProperty() # 2 q1a = ndb.StringProperty(indexed=False) q1b = ndb.StringProperty(indexed=False) q2a = ndb.FloatProperty() q2b = ndb.FloatProperty() q3a1m = ndb.IntegerProperty() q3a1f = ndb.IntegerProperty() q3a2m = ndb.IntegerProperty() q3a2f = ndb.IntegerProperty() q3a3m = ndb.IntegerProperty() q3a3f = ndb.IntegerProperty() q3a4m = ndb.IntegerProperty() q3a4f = ndb.IntegerProperty() q3a5m = ndb.IntegerProperty() q3a5f = ndb.IntegerProperty() q3b = ndb.BooleanProperty() q3c = ndb.BooleanProperty() q3d = ndb.TextProperty() # 3 q4a = ndb.StringProperty(indexed=False) q4b1 = ndb.BooleanProperty() q4b2 = ndb.FloatProperty() q4b3 = ndb.FloatProperty() q5a = ndb.StringProperty(indexed=False) q5b = ndb.StringProperty(indexed=False) q5c = ndb.StringProperty(indexed=False) q5d = ndb.TextProperty() # 4 q6 = ndb.StringProperty(indexed=False) q7a = ndb.BooleanProperty() q7b = ndb.StringProperty(indexed=False) # summernormal summermorning = ndb.StringProperty(indexed=False) summerlunch = ndb.StringProperty(indexed=False) summerevening = ndb.StringProperty(indexed=False) summerlatenight = ndb.StringProperty(indexed=False) summerdata = ndb.StringProperty(indexed=False) # summerlimited summermorninglimited = ndb.StringProperty(indexed=False) summerlunchlimited = ndb.StringProperty(indexed=False) summereveninglimited = ndb.StringProperty(indexed=False) summerlatenightlimited = ndb.StringProperty(indexed=False) summerdatalimited = ndb.StringProperty(indexed=False) # 16 summer1full = ndb.FloatProperty() summer1limited = ndb.FloatProperty() summer2full = ndb.FloatProperty() summer2limited = ndb.FloatProperty() summer3full = ndb.FloatProperty() summer3limited = ndb.FloatProperty() # winternormal wintermorning = ndb.StringProperty(indexed=False) winterlunch = ndb.StringProperty(indexed=False) winterevening = ndb.StringProperty(indexed=False) winterlatenight = ndb.StringProperty(indexed=False) winterdata = ndb.StringProperty(indexed=False) # winterlimited wintermorninglimited = ndb.StringProperty(indexed=False) winterlunchlimited = ndb.StringProperty(indexed=False) wintereveninglimited = ndb.StringProperty(indexed=False) winterlatenightlimited = ndb.StringProperty(indexed=False) winterdatalimited = ndb.StringProperty(indexed=False) # 26 winter1full = ndb.FloatProperty() winter1limited = ndb.FloatProperty() winter2full = ndb.FloatProperty() winter2limited = ndb.FloatProperty() winter3full = ndb.FloatProperty() winter3limited = ndb.FloatProperty() # 27 bg1 = ndb.StringProperty(indexed=False) bg2 = ndb.StringProperty(indexed=False) # 28 reward_type = ndb.StringProperty(indexed=False) reward_address = ndb.TextProperty()