File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22# Copyright 2016 LasLabs Inc.
33# License MIT (https://opensource.org/licenses/MIT).
44
5+ import enum
6+
57from sqlalchemy import (Column ,
68 Integer ,
79 DateTime ,
8- ForeignKey
10+ ForeignKey ,
11+ Enum ,
912 )
1013from sqlalchemy .ext .declarative import declared_attr
1114
1215
16+ class EnumAddressType (enum .Enum ):
17+ """ It provides PEP-0435 compliant Carepoint Address Type Enumerable """
18+
19+ business = 1
20+ home = 2
21+ school = 3
22+ vacation = 4
23+ other = 5
24+ billing = 6
25+ shipping = 7
26+
27+
1328class AddressMixin (object ):
1429 """ This is a mixin for Address Many2Many bindings """
1530
1631 priority = Column (Integer )
17- addr_type_cn = Column (Integer )
32+ addr_type_cn = Column (
33+ Enum (EnumAddressType ),
34+ )
1835 app_flags = Column (Integer )
1936 timestmp = Column (DateTime )
2037
Original file line number Diff line number Diff line change 22# Copyright 2016 LasLabs Inc.
33# License MIT (https://opensource.org/licenses/MIT).
44
5+ import enum
6+
57from sqlalchemy import (Column ,
68 Integer ,
79 DateTime ,
8- ForeignKey
10+ ForeignKey ,
11+ Enum ,
912 )
1013from sqlalchemy .ext .declarative import declared_attr
1114
1215
16+ class EnumPhoneType (enum .Enum ):
17+ """ It provides PEP-0435 compliant Carepoint Phone Type Enumerable """
18+
19+ assistant = 1
20+ business = 2
21+ business_2 = 3
22+ business_fax = 4
23+ car = 5
24+ home = 6
25+ home_2 = 7
26+ home_fax = 8
27+ mobile = 9
28+ beeper = 10
29+ other_fax = 11
30+
31+
1332class PhoneMixin (object ):
1433 """ This is a mixin for Phone Many2Many bindings """
1534
1635 priority = Column (Integer )
17- phone_type_cn = Column (Integer )
36+ phone_type_cn = Column (
37+ Enum (EnumPhoneType ),
38+ )
1839 app_flags = Column (Integer )
1940 timestmp = Column (DateTime )
2041
Original file line number Diff line number Diff line change 88
99
1010PACKAGE_NAME = 'carepoint'
11- VERSION = '0.0.1.1 '
11+ VERSION = '0.1.2 '
1212
1313
1414setup (
You can’t perform that action at this time.
0 commit comments