Subversion Repositories SmartDukaan

Rev

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

Rev 7987 Rev 8201
Line 50... Line 50...
50
    last_login = Field(DateTime)
50
    last_login = Field(DateTime)
51
    last_logout = Field(DateTime)
51
    last_logout = Field(DateTime)
52
    active_since = Field(DateTime)
52
    active_since = Field(DateTime)
53
    fbusers = OneToMany("FacebookUser")
53
    fbusers = OneToMany("FacebookUser")
54
    addresses = OneToMany("Address")
54
    addresses = OneToMany("Address")
-
 
55
    sources = OneToMany("UserSource")
55
    using_options(shortnames=True)
56
    using_options(shortnames=True)
56
    using_table_options(mysql_engine="InnoDB")
57
    using_table_options(mysql_engine="InnoDB")
57
 
58
 
58
class FacebookUser(Entity):
59
class FacebookUser(Entity):
59
    user = ManyToOne("User", primary_key=True)
60
    user = ManyToOne("User", primary_key=True)
60
    facebook_access_token = Field(String(200))
61
    facebook_access_token = Field(String(200))
61
    facebook_id = Field(String(50))
62
    facebook_id = Field(String(50))
62
    using_options(shortnames=True)
63
    using_options(shortnames=True)
63
    using_table_options(mysql_engine="InnoDB")
64
    using_table_options(mysql_engine="InnoDB")
64
 
65
 
-
 
66
class UserSource(Entity):
-
 
67
    user = ManyToOne("User", primary_key=True)
-
 
68
    source_id = Field(Integer)
-
 
69
    using_options(shortnames=True)
-
 
70
    using_table_options(mysql_engine="InnoDB")
-
 
71
    
65
class Line(Entity):
72
class Line(Entity):
66
    cart = ManyToOne("Cart", primary_key=True)
73
    cart = ManyToOne("Cart", primary_key=True)
67
    item_id = Field(Integer, primary_key=True, autoincrement=False)
74
    item_id = Field(Integer, primary_key=True, autoincrement=False)
68
    quantity = Field(Float)
75
    quantity = Field(Float)
69
    line_status = Field(Integer)
76
    line_status = Field(Integer)