orders_local.py 1.6 KB

123456789101112131415161718192021222324252627282930
  1. from django.db import models
  2. from metaservicesynced.models import Orders, Resource
  3. class OrdersLocal(models.Model):
  4. """
  5. OrdersLocal - таблица с заказами
  6. """
  7. order_synced = models.ForeignKey(Orders, null=True, on_delete=models.DO_NOTHING)
  8. resource_id = models.ForeignKey(Resource, null=True, on_delete=models.DO_NOTHING)
  9. rating_id = models.IntegerField(null=True)#Need create table with rating
  10. payment_transaction_id = models.IntegerField(null=True)#Need create table with payment_transaction or it get from platform (i dont know)
  11. attempts = models.IntegerField(null=True, help_text="Попытки")
  12. order_place_type = models.CharField(null=True, max_length=150)
  13. order_place_start = models.CharField(null=True, max_length=150)
  14. order_place_start_gps = models.CharField(null=True, max_length=150)
  15. order_place_start_sector = models.IntegerField(null=True)
  16. order_place_start_real = models.CharField(null=True, max_length=150)
  17. order_place_start_real_gps = models.CharField(null=True, max_length=150)
  18. order_place_finish_predicted = models.CharField(null=True, max_length=150)
  19. order_place_finish_predicted_gps = models.CharField(null=True, max_length=150)
  20. order_place_finish_sector = models.IntegerField(null=True)
  21. order_place_finish_real = models.CharField(null=True, max_length=150)
  22. order_place_finish_real_gps = models.CharField(null=True, max_length=150)
  23. class Meta:
  24. db_table = "orders_local"
  25. verbose_name = "Заказ (local)"
  26. verbose_name_plural = "Заказы (local)"