Subversion Repositories SmartDukaan

Rev

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

Rev 6591 Rev 6594
Line 1... Line 1...
1
'''
1
'''
2
Created on 29-Mar-2010
2
Created on 29-Mar-2010
3
 
3
 
4
@author: ashish
4
@author: ashish
5
'''
5
'''
-
 
6
from MySQLdb.constants.FLAG import AUTO_INCREMENT
6
from elixir import metadata, setup_all
7
from elixir import metadata, setup_all
7
from elixir.entity import Entity
8
from elixir.entity import Entity
8
from elixir.fields import Field
9
from elixir.fields import Field
9
from elixir.options import using_options, using_table_options
10
from elixir.options import using_options, using_table_options
10
from elixir.relationships import ManyToOne, OneToMany
11
from elixir.relationships import ManyToOne, OneToMany
11
from sqlalchemy.engine import create_engine
12
from sqlalchemy.engine import create_engine
12
from sqlalchemy.types import Integer, String, Float, DateTime, Boolean, Enum, Numeric
13
from sqlalchemy.types import Integer, String, Float, DateTime, Boolean, Enum, \
13
from MySQLdb.constants.FLAG import AUTO_INCREMENT
14
    Numeric, BigInteger
14
 
15
 
15
#===============================================================================
16
#===============================================================================
16
# Different entities in the model
17
# Different entities in the model
17
#===============================================================================
18
#===============================================================================
18
 
19
 
Line 248... Line 249...
248
    using_options(shortnames=True)
249
    using_options(shortnames=True)
249
    using_table_options(mysql_engine="InnoDB")
250
    using_table_options(mysql_engine="InnoDB")
250
    
251
    
251
class BlockedIpRange(Entity):
252
class BlockedIpRange(Entity):
252
    id = Field(Integer, primary_key=True, autoincrement=True)
253
    id = Field(Integer, primary_key=True, autoincrement=True)
253
    start = Field(Integer)
254
    start = Field(BigInteger)
254
    end = Field(Integer)
255
    end = Field(BigInteger)
255
    expiredOn = Field(DateTime)
256
    expiredOn = Field(DateTime)
256
    using_options(shortnames=True)
257
    using_options(shortnames=True)
257
    using_table_options(mysql_engine="InnoDB")
258
    using_table_options(mysql_engine="InnoDB")
258
 
259
 
259
class DeniedIpAddress(Entity):
260
class DeniedIpAddress(Entity):