forked from soumoks/caring-companion-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Citizen.py
26 lines (24 loc) · 840 Bytes
/
Citizen.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
#from mongoengine import *
import json
from marshmallow import schema
# class Citizen(Document):
# name = StringField(required=True,max_length=20)
# descr = StringField(required=True,max_length=200)
# home = StringField(required=True,max_length=20)
# interests = ListField(required=True)
# timeslots = ListField(required=True)
# def __str__(self):
# return self.name + " " + self.descr
# def get_json(self):
# return Citizen.__dict__
# # def __init__(self,name,descr,home,interests=[],timeslots=[]):
# # self.name = name
# # self.descr = descr
# # self.home = home
# # self.interests = interests
# # self.timeslots = timeslots
class Citizen(schema):
name = fields.Str()
descr = fields.Str()
home = fields.Str()
interests = fields.