Subversion Repositories SmartDukaan

Rev

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

Rev 8374 Rev 8491
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, Enum
12
from sqlalchemy.types import Integer, String, DateTime, Float, Boolean, Enum, Date
13
import datetime
13
import datetime
14
 
14
 
15
class Vendor(Entity):
15
class Vendor(Entity):
16
    id = Field(Integer, primary_key=True, autoincrement=True)
16
    id = Field(Integer, primary_key=True, autoincrement=True)
17
    name = Field(String(50))
17
    name = Field(String(50))
Line 75... Line 75...
75
    transfer_price = Field(Float)
75
    transfer_price = Field(Float)
76
    nlc = Field(Float)
76
    nlc = Field(Float)
77
    using_options(shortnames=True)
77
    using_options(shortnames=True)
78
    using_table_options(mysql_engine="InnoDB")
78
    using_table_options(mysql_engine="InnoDB")
79
 
79
 
80
class VendorItemProcurementDelay(Entity):
-
 
81
    vendor = ManyToOne('Vendor', primary_key=True)
-
 
82
    item_id = Field(Integer, primary_key=True)
-
 
83
    procurementDelay = Field(Integer)
-
 
84
    using_options(shortnames=True)
-
 
85
    using_table_options(mysql_engine="InnoDB")
-
 
86
 
-
 
87
class VendorHolidays(Entity):
80
class VendorHolidays(Entity):
88
    vendor = ManyToOne('Vendor', primary_key=True)
81
    vendor = ManyToOne('Vendor', primary_key=True)
89
    holidayType = Field(Integer, primary_key=True, autoincrement=False)
82
    date = Field(Date, primary_key=True)
90
    holidayValue = Field(Integer, primary_key=True, autoincrement=False)
-
 
91
    occasion = Field(String(100))
83
    occasion = Field(String(100))
92
    using_options(shortnames=True)
84
    using_options(shortnames=True)
93
    using_table_options(mysql_engine="InnoDB")
85
    using_table_options(mysql_engine="InnoDB")
94
        
86
        
95
class CurrentInventorySnapshot(Entity):
87
class CurrentInventorySnapshot(Entity):