class SurrogatePerson(Record): name = Property(isa=Name) ssn = Property(isa=str, check=lambda x: re.match(r'\d{3}-\d{2}-\d{4}', x)) date_of_birth = DateProperty() description = UnicodeProperty() phone_number = StringProperty() primary_key = [ssn]
class Event(JsonRecord): id = IdProperty() chapter = IdProperty() projects = Property(isa=list) name = UnicodeProperty() description = UnicodeProperty() location = UnicodeProperty() event_start = DateProperty() event_pricing = Property(isa=dict) rsvp_tickets = StringProperty() images = Property(isa=list)
class Project(JsonRecord): id = IdProperty() project_id = IntProperty() primary_key = [project_id] name = UnicodeProperty() description = UnicodeProperty() org_description = UnicodeProperty() purpose = UnicodeProperty() additional_info = UnicodeProperty() secondary_focus = StringProperty() state = StringProperty() project_type = IntProperty() focus = IntProperty() area = StringProperty() address = UnicodeProperty() contact_chapter = IdProperty(json_name="contact_chapter") first_funded = IntProperty() total_funds = FloatProperty() status = IntProperty() images = Property(isa=list)
class MyRecord(NCAutoJsonRecord): blah_blah = Property(json_name="blahBlah")
class Pilcrow(Record): bar = ListProperty(of=Octothorpe) foo = Property(isa=Caret) baz = Property()
class OhNoRecord(Record): lets_go = Property(isa=datetime)
class Octothorpe(Record): name = Property() boo = Property() hiss = Property()
class FussPot(Record): fuss_list = ListProperty(of=FussyRecord) fuss_map = DictProperty(of=FussyRecord) top_fuss = Property(isa=FussyRecord)
class Listicle(Record): theme = Property() witty_examples = ListProperty(of=Item)
class NumRecord(Record): which = Property(isa=(OneRecord, TwoRecord))
class TwoRecord(Record): bar = Property(isa=type(None)) def __call__(self): return "hi"
class OneRecord(Record): foo = Property(isa=type(2))
class SophiesRecord(Record): placeholder = Property() aux_placeholder = Property(default='') age = Property(default=0) name = V1Property(isa=basestring)
class Foo(Record): bar = Property()
class HashMap(Record): intent = Property() hashed = DictProperty(of=Item)
class Item(Record): name = Property()
class LooseRecord(Record): this = Property(isa=(OneRecord, TwoRecord, datetime)) that = Property(isa=MagicRecord) other = Property(isa=MagicList)
class FussyRecord(Record): id = Property(required=True)
class SophiesRecord(Record): placeholder = Property() aux_placeholder = Property(empty='') age = Property(empty=0) name = Property(empty=None)
class MyObj(Record): foo = Property() bar = Property()
class BlahRecord(Record): blah = Property()
class Pilcrow(Record): bar = ListProperty(of=Octothorpe) foo = Property(isa=Caret) baz = Property() quux = DictProperty(of=str) frop = DictProperty(of=list_of(unicode))
class LambdaRecord(Record): epoch = Property(isa=datetime) objective = Property(isa=BlahRecord)