Subversion Repositories SmartDukaan

Rev

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

Rev 5386 Rev 5389
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 ManyToOne, OneToMany
10
from elixir.relationships import ManyToOne, OneToMany
11
from sqlalchemy.engine import create_engine
11
from sqlalchemy.engine import create_engine
12
from sqlalchemy.types import Integer, String, Float, DateTime, Boolean, Enum
12
from sqlalchemy.types import Integer, String, Float, DateTime, Boolean, Enum, Numeric
13
 
13
 
14
#===============================================================================
14
#===============================================================================
15
# Different entities in the model
15
# Different entities in the model
16
#===============================================================================
16
#===============================================================================
17
 
17
 
Line 185... Line 185...
185
class EBSSettlementSummary(Entity):
185
class EBSSettlementSummary(Entity):
186
    settlementId = Field(Integer, primary_key = True)
186
    settlementId = Field(Integer, primary_key = True)
187
    settlementDate = Field(DateTime)
187
    settlementDate = Field(DateTime)
188
    transactionDateFrom = Field(DateTime)
188
    transactionDateFrom = Field(DateTime)
189
    transactionDateTo = Field(DateTime)
189
    transactionDateTo = Field(DateTime)
190
    amount = Field(Float)
190
    amount = Field(Numeric(precision=11, scale=3, asdecimal=False))
191
    detailsUploaded = Field(Boolean)
191
    detailsUploaded = Field(Boolean)
192
    using_options(shortnames=True)
192
    using_options(shortnames=True)
193
    using_table_options(mysql_engine="InnoDB")
193
    using_table_options(mysql_engine="InnoDB")
194
 
194
 
195
class PaymentSettlement(Entity):
195
class PaymentSettlement(Entity):
196
    referenceId = Field(Integer)    #PaymentID in case of prepaid & Order Id in case of COD
196
    referenceId = Field(Integer)    #PaymentID in case of prepaid & Order Id in case of COD
197
    originalOrderId = Field(Integer)    #originalOrderId in case of prepaid is NULL & Order Id of original Order or Order Id in case of COD
197
    originalOrderId = Field(Integer)    #originalOrderId in case of prepaid is NULL & Order Id of original Order or Order Id in case of COD
198
    paymentGatewayId = Field(Integer)
198
    paymentGatewayId = Field(Integer)
199
    settlementDate = Field(DateTime)
199
    settlementDate = Field(DateTime)
200
    serviceTax = Field(Float)
200
    serviceTax = Field(Numeric(precision=11, scale=3, asdecimal=False))
201
    otherCharges = Field(Float)
201
    otherCharges = Field(Numeric(precision=11, scale=3, asdecimal=False))
202
    netCollection = Field(Float)
202
    netCollection = Field(Numeric(precision=11, scale=3, asdecimal=False))
203
    using_options(shortnames=True)
203
    using_options(shortnames=True)
204
    using_table_options(mysql_engine="InnoDB")
204
    using_table_options(mysql_engine="InnoDB")
205
205