coding utf-8 from django db import models from django utils translatio

  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
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
# coding=utf-8
from django.db import models
from django.utils.translation import ugettext_lazy as _
from apps.trucks.generics import *
from references.models import *
class Dumper4x2(Dumper):
class Meta:
verbose_name = _('dumper 4x2')
verbose_name_plural = _('dumpers 4x2')
similars = models.ManyToManyField('self', blank=True, null=True)
#Полная масса на переднюю ось, т
weight_on_front_axis = models.FloatField(_('weight on front axis'), blank=True, null=True)
#Полная масса на заднюю ось, т
weight_on_rear_axis = models.FloatField(_('weight on rear axis'), blank=True, null=True)
class Dumper4x2Photo(Photo):
truck = models.ForeignKey(Dumper4x2, verbose_name=_(u'truck'),
related_name = 'photos')
class Dumper4x2Document(Document):
truck = models.ForeignKey(Dumper4x2, verbose_name=_(u'truck'),
related_name = 'docs')
class Dumper6x4(Dumper):
class Meta:
verbose_name = _('dumper 6x4')
verbose_name_plural = _('dumpers 6x4')
similars = models.ManyToManyField('self', blank=True, null=True)
#Полная масса на переднюю ось, т
weight_on_front_axis = models.FloatField(_('weight on front axis'), blank=True, null=True)
#Полная масса на заднюю тележку, т
weight_on_rear_axis = models.FloatField(_('weight on rear cart'), blank=True, null=True)
class Dumper6x4Photo(Photo):
truck = models.ForeignKey(Dumper6x4, verbose_name=_(u'truck'),
related_name = 'photos')
class Dumper6x4Document(Document):
truck = models.ForeignKey(Dumper6x4, verbose_name=_(u'truck'),
related_name = 'docs')
class Dumper8x4(Dumper):
class Meta:
verbose_name = _('dumper 8x4')
verbose_name_plural = _('dumpers 8x4')
similars = models.ManyToManyField('self', blank=True, null=True)
#Полная масса на переднюю ось, т
weight_on_front_axis = models.FloatField(_('weight on front axes'), blank=True, null=True)
#Полная масса на заднюю тележку, т
weight_on_rear_axis = models.FloatField(_('weight on rear cart'), blank=True, null=True)
class Dumper8x4Photo(Photo):
truck = models.ForeignKey(Dumper8x4, verbose_name=_(u'truck'),
related_name = 'photos')
class Dumper8x4Document(Document):
truck = models.ForeignKey(Dumper8x4, verbose_name=_(u'truck'),
related_name = 'docs')
class SaddleTractor4x2(SaddleTractor):
class Meta:
verbose_name = _('saddle tractor 4x2')
verbose_name_plural = _('saddle tractors 4x2')
similars = models.ManyToManyField('self', blank=True, null=True)
#Полная масса на переднюю ось, т
weight_on_front_axis = models.FloatField(_('weight on front axis'), blank=True, null=True)
#Полная масса на заднюю ось, т
weight_on_rear_axis = models.FloatField(_('weight on rear axis'), blank=True, null=True)
class SaddleTractor4x2Photo(Photo):
truck = models.ForeignKey(SaddleTractor4x2, verbose_name=_(u'truck'),
related_name = 'photos')
class SaddleTractor4x2Document(Document):
truck = models.ForeignKey(SaddleTractor4x2, verbose_name=_(u'truck'),
related_name = 'docs')
class SaddleTractor6x4(SaddleTractor):
class Meta:
verbose_name = _('saddle tractor 6x4')
verbose_name_plural = _('saddle tractors 6x4')
similars = models.ManyToManyField('self', blank=True, null=True)
#Полная масса на переднюю ось, т
weight_on_front_axis = models.FloatField(_('weight on front axis'), blank=True, null=True)
#Полная масса на заднюю тележку, т
weight_on_rear_axis = models.FloatField(_('weight on rear cart'), blank=True, null=True)
class SaddleTractor6x4Photo(Photo):
truck = models.ForeignKey(SaddleTractor6x4, verbose_name=_(u'truck'),
related_name = 'photos')
class SaddleTractor6x4Document(Document):
truck = models.ForeignKey(SaddleTractor6x4, verbose_name=_(u'truck'),
related_name = 'docs')
class BoardTractor6x4(BoardTractor):
class Meta:
verbose_name = _('board tractor 6x4')
verbose_name_plural = _('board tractors 6x4')
similars = models.ManyToManyField('self', blank=True, null=True)
#Полная масса на переднюю ось, т
weight_on_front_axis = models.FloatField(_('weight on front axes'), blank=True, null=True)
#Полная масса на заднюю тележку, т
weight_on_rear_axis = models.FloatField(_('weight on rear cart'), blank=True, null=True)
class BoardTractor6x4Photo(Photo):
truck = models.ForeignKey(BoardTractor6x4, verbose_name=_(u'truck'),
related_name = 'photos')
class BoardTractor6x4Document(Document):
truck = models.ForeignKey(BoardTractor6x4, verbose_name=_(u'truck'),
related_name = 'docs')
class ABS6x4(ABS):
class Meta:
verbose_name = _('ABS 6x4')
verbose_name_plural = _('ABSes 6x4')
similars = models.ManyToManyField('self', blank=True, null=True)
#Полная масса на переднюю ось, т
weight_on_front_axis = models.FloatField(_('weight on front axis'), blank=True, null=True)
#Полная масса на заднюю тележку, т
weight_on_rear_axis = models.FloatField(_('weight on rear cart'), blank=True, null=True)
class ABS6x4Photo(Photo):
truck = models.ForeignKey(ABS6x4, verbose_name=_(u'truck'),
related_name = 'photos')
class ABS6x4Document(Document):
truck = models.ForeignKey(ABS6x4, verbose_name=_(u'truck'),
related_name = 'docs')
class Loader(TruckExtension):
pitchfork_ascent_height = models.PositiveIntegerField(
_(u'pitchfork ascent height'),
blank=True, null=True)
pitchfork_free_mode = models.PositiveIntegerField(
_(u'pitchfork free move'),
blank=True, null=True)
pitchfork_size = models.CharField(_(u'pitchfork size'),
max_length=255, blank=True)
mast_slope = models.CharField(_(u'mast slope'),
max_length=255, blank=True)
raised_mast_height = models.PositiveIntegerField(_(u'raised mast height'),
blank=True, null=True)
hanged_mast_height = models.PositiveIntegerField(_(u'hanged mast height'),
blank=True, null=True)
defence_roof_height = models.PositiveIntegerField(_(u'defence roof height'),
blank=True, null=True)
class Meta:
verbose_name = _(u'loader')
verbose_name_plural = _(u'loaders')
class LoaderPhoto(Photo):
truck = models.ForeignKey(Loader, verbose_name=_(u'truck'),
related_name = 'photos')
class LoaderDocument(Document):
truck = models.ForeignKey(Loader, verbose_name=_(u'truck'),
related_name = 'docs')
class Tractor(TruckExtension):
wheels_rut = models.CharField(_(u'wheels rut'),
max_length=255, blank=True)
tumbling_radius = models.CharField(_(u'tumbling radius'),
max_length=255, blank=True)
draw_power = models.CharField(_(u'draw power'),
max_length=255, blank=True)
max_gross_power = models.CharField(_(u'max gross power'),
max_length=255, blank=True)
class Meta:
verbose_name = _(u'china truck')
verbose_name_plural = _(u'china trucks')
class TractorPhoto(Photo):
truck = models.ForeignKey(Tractor, verbose_name=_(u'truck'),
related_name = 'photos')
class TractorDocument(Document):
truck = models.ForeignKey(Tractor, verbose_name=_(u'truck'),
related_name = 'docs')
class LightTruck(TruckExtension):
body_volume = models.PositiveIntegerField(_('body volume'),
blank=True, null=True)
bridge_analog = models.CharField(_(u'bridge analog'),
max_length=255, blank=True)
brakes_abs = models.BooleanField(_(u'brakes_abs'),
default=False)
brakes_mechs_front = models.CharField(_(u'brakes mechs front'),
max_length=255, blank=True)
brakes_mechs_back = models.CharField(_(u'brakes mechs back'),
max_length=255, blank=True)
anticorrosion_processing = models.BooleanField(_(u'anticorrosion processing'),
default=True)
weight_on_rear_axis = models.FloatField(_('weight on rear axis'),
blank=True, null=True)
borders_height = models.PositiveIntegerField(_('borders height'),
blank=True, null=True)
unload_direction = models.ForeignKey(UnloadDirection,
verbose_name=_('unload direction'), blank=True, null=True)
body_heating = models.BooleanField(_(u'body heating'), default=False)
valance = models.BooleanField(_(u'valance'), default=False)
loading_height = models.PositiveIntegerField(_(u'loading height'),
blank=True, null=True)
class Meta:
abstract = True
class LightTruckB(LightTruck):
tonnage = models.PositiveIntegerField(_(u'tonnage'),
blank=True, null=True)
rights_category = models.CharField(_(u'rights category'),
max_length=255, blank=True)
body_inner_sizes = models.CharField(_(u'body inner sizes'),
max_length=255, blank=True)
class Meta:
verbose_name = _(u'light truck b')
verbose_name_plural = _(u'light trucks b')
class LightTruckBPhoto(Photo):
truck = models.ForeignKey(LightTruckB, verbose_name=_(u'truck'),
related_name = 'photos')
class LightTruckBDocument(Document):
truck = models.ForeignKey(LightTruckB, verbose_name=_(u'truck'),
related_name = 'docs')
class LightTruckC(LightTruck):
carriage_tonnage = models.PositiveIntegerField(_('carriage tonnage'),
blank=True, null=True)
cylinders_num = models.PositiveIntegerField(_('cylinders num'),
blank=True, null=True)
disc_num = models.PositiveIntegerField(_('disc num'),
blank=True, null=True)
traction_direction = models.CharField(_(u'traction direction'),
max_length=255, blank=True)
traction_drive = models.CharField(_(u'traction drive'),
max_length=255, blank=True)
kpp_drive = models.CharField(_(u'kpp drive'),
max_length=255, blank=True)
brakes_drive = models.CharField(_(u'brakes drive'),
max_length=255, blank=True)
brakes_asr = models.BooleanField(_(u'brakes asr'),
default=False)
back_overhang_angle = models.SmallIntegerField(_('back overhang angle'),
blank=True, null=True)
front_overhang = models.PositiveIntegerField(_('front overhang'),
blank=True, null=True)
back_overhang = models.PositiveIntegerField(_('back overhang'),
blank=True, null=True)
uturn_radius = models.FloatField(_('uturn_radius'),
blank=True, null=True)
body_length = models.PositiveIntegerField(_('body length'),
blank=True, null=True)
body_width = models.PositiveIntegerField(_('body width'),
blank=True, null=True)
body_height = models.PositiveIntegerField(_('body height'),
blank=True, null=True)
class Meta:
verbose_name = _(u'light truck c')
verbose_name_plural = _(u'light trucks c')
class LightTruckCPhoto(Photo):
truck = models.ForeignKey(LightTruckC, verbose_name=_(u'truck'),
related_name = 'photos')
class LightTruckCDocument(Document):
truck = models.ForeignKey(LightTruckC, verbose_name=_(u'truck'),
related_name = 'docs')