Subversion Repositories SmartDukaan

Rev

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

Rev 6848 Rev 6903
Line 7... Line 7...
7
from elixir.entity import Entity
7
from elixir.entity import Entity
8
from elixir.fields import Field
8
from elixir.fields import Field
9
from elixir.options import using_options, using_table_options
9
from elixir.options import using_options, using_table_options
10
from elixir.relationships import OneToMany, ManyToOne
10
from elixir.relationships import OneToMany, ManyToOne
11
from sqlalchemy import create_engine
11
from sqlalchemy import create_engine
12
from sqlalchemy.types import Integer, String, DateTime, Float, Boolean, Text, Enum
12
from sqlalchemy.types import Integer, String, DateTime, Float, Boolean, Text, Enum, BigInteger
13
import datetime
13
import datetime
14
import elixir
14
import elixir
15
 
15
 
16
class EntityIDGenerator(Entity):
16
class EntityIDGenerator(Entity):
17
    id=Field(Integer, primary_key=True)
17
    id=Field(Integer, primary_key=True)
Line 177... Line 177...
177
    
177
    
178
class Insurer(Entity):
178
class Insurer(Entity):
179
    id = Field(Integer, primary_key=True, autoincrement=True)
179
    id = Field(Integer, primary_key=True, autoincrement=True)
180
    name = Field(String(255))
180
    name = Field(String(255))
181
    address = Field(String(255))
181
    address = Field(String(255))
-
 
182
    declaredAmount = Field(BigInteger)
-
 
183
    creditedAmount = Field(BigInteger)
182
    using_options(shortnames=True)
184
    using_options(shortnames=True)
183
    using_table_options(mysql_engine="InnoDB")
185
    using_table_options(mysql_engine="InnoDB")
184
    
186
    
185
def initialize(dbname='catalog', db_hostname="localhost"):
187
def initialize(dbname='catalog', db_hostname="localhost"):
186
    #metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
188
    #metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.