-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.py
66 lines (48 loc) · 1.68 KB
/
models.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
from database import Base
from sqlalchemy import Column, Integer, String
from sqlalchemy.types import DateTime
class CarBrand(Base):
__tablename__ = 'car_brand'
id = Column(String(256), primary_key=True)
name = Column(String(256))
parse_date = Column(DateTime())
class CarModelFamily(Base):
__tablename__ = 'car_model_family'
id = Column(String(256), primary_key=True)
brand_id = Column(String(256))
name = Column(String(256))
parse_date = Column(DateTime())
class CarModel(Base):
__tablename__ = 'car_model'
id = Column(String(256), primary_key=True)
family_id = Column(String(256))
name = Column(String(256))
parse_date = Column(DateTime())
class CarObject(Base):
__tablename__ = 'car_object'
id = Column(Integer, primary_key=True)
brand_id = Column(String(256))
family_id = Column(String(256))
model_id = Column(String(256))
parse_date = Column(DateTime())
class ProductObject(Base):
__tablename__ = 'product_object'
id = Column(String(256), primary_key=True)
code = Column(String(256))
name = Column(String(256))
group_code = Column(String(256))
group_name = Column(String(256))
price = Column(String(256))
prof1_price = Column(String(256))
prof2_price = Column(String(256))
is_order_allow = Column(Integer)
producer_name = Column(String(256))
is_universal = Column(Integer)
onstock = Column(Integer)
parse_date = Column(DateTime())
class CarProductLink(Base):
__tablename__ = 'car_product_link'
id = Column(Integer, primary_key=True)
car_object_id = Column(String(256))
product_object_id = Column(String(256))
parse_date = Column(DateTime())