webservice_running.py 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. from django.db import models
  2. from dbsynce.models import Orders, Resource
  3. from django.contrib.postgres.fields import ArrayField
  4. class OrdersLocal(models.Model):
  5. """
  6. OrdersLocal - таблица с заказами
  7. """
  8. order_synced = models.ForeignKey(Orders, on_delete=models.DO_NOTHING)
  9. resource_id = models.ForeignKey(Resource, null=True, on_delete=models.DO_NOTHING)
  10. rating_id = models.IntegerField(null=True)#Need create table with rating
  11. payment_transaction_id = models.IntegerField(null=True)#Need create table with payment_transaction or it get from platform (i dont know)
  12. attempts = models.IntegerField(null=True, help_text="Попытки")
  13. order_place_type = models.CharField(null=True, max_length=150)
  14. order_place_start = models.CharField(null=True, max_length=150)
  15. order_place_start_gps = models.CharField(null=True, max_length=150)
  16. order_place_start_sector = models.IntegerField(null=True)
  17. order_place_start_real = models.CharField(null=True, max_length=150)
  18. order_place_start_real_gps = models.CharField(null=True, max_length=150)
  19. order_place_finish_predicted = models.CharField(null=True, max_length=150)
  20. order_place_finish_predicted_gps = models.CharField(null=True, max_length=150)
  21. order_place_finish_sector = models.IntegerField(null=True)
  22. order_place_finish_real = models.CharField(null=True, max_length=150)
  23. order_place_finish_real_gps = models.CharField(null=True, max_length=150)
  24. comment = models.CharField(null=True, max_length=300)
  25. journey_places = ArrayField(models.CharField(max_length=200), blank=True, default=list)
  26. guide_type = models.IntegerField(null=True)
  27. movement_way = models.IntegerField(null=True)
  28. numb_of_people = models.IntegerField(null=True)
  29. is_with_payment_document = models.BooleanField(default=False)
  30. asap = models.BooleanField(default=False)
  31. due_date = models.DateTimeField(null=True)
  32. class Meta:
  33. db_table = "orders_local"
  34. verbose_name = "Заказ (local)"
  35. verbose_name_plural = "Заказы (local)"