Subversion Repositories SmartDukaan

Rev

Rev 8201 | Rev 9300 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8201 Rev 8707
Line 10... Line 10...
10
from sqlalchemy import create_engine
10
from sqlalchemy import create_engine
11
from sqlalchemy.types import Integer
11
from sqlalchemy.types import Integer
12
from elixir.relationships import OneToMany, ManyToOne
12
from elixir.relationships import OneToMany, ManyToOne
13
import datetime
13
import datetime
14
import elixir
14
import elixir
-
 
15
from sqlalchemy.types import Integer, String, Float, DateTime, Boolean, Enum, \
-
 
16
    Numeric, BigInteger, LargeBinary,Date
15
 
17
 
16
class Address(Entity):
18
class Address(Entity):
17
    id = Field(Integer, primary_key=True, autoincrement=True)
19
    id = Field(Integer, primary_key=True, autoincrement=True)
18
    line_1 = Field(String(100))
20
    line_1 = Field(String(100))
19
    line_2 = Field(String(100))
21
    line_2 = Field(String(100))
Line 125... Line 127...
125
 
127
 
126
class Coupon(Entity):
128
class Coupon(Entity):
127
    coupon_code = Field(String(20))
129
    coupon_code = Field(String(20))
128
    promotion = ManyToOne("Promotion")
130
    promotion = ManyToOne("Promotion")
129
    arguments = Field(String(200))
131
    arguments = Field(String(200))
-
 
132
    coupon_category = Field(Enum('CUSTOMER_SATISFACTION','MARKETING','REFUND'))
130
    using_options(shortnames = True)
133
    using_options(shortnames = True)
131
    using_table_options(mysql_engine = "InnoDB")
134
    using_table_options(mysql_engine = "InnoDB")
132
 
135
 
133
class PromotionTracker(Entity):
136
class PromotionTracker(Entity):
134
    coupon_code = Field(String(20))
137
    coupon_code = Field(String(20))