orders_local.py 1.6 KB

123456789101112131415161718192021222324252627282930313233
  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. name_order = models.CharField(null=True, max_length=300)
  14. comment = models.CharField(null=True, max_length=300, default="-")
  15. place_start = models.CharField(null=True, max_length=100)
  16. place_end = models.CharField(null=True, max_length=100)
  17. guide_type = models.CharField(null=True, max_length=100)
  18. movement_way = models.CharField(null=True, max_length=100)
  19. numb_of_people = models.IntegerField(null=True)
  20. # is_with_payment_document = models.BooleanField(default=False)
  21. # asap = models.BooleanField(default=False)
  22. # due_date = models.DateTimeField(null=True)
  23. service_date = models.DateTimeField(null=True)
  24. service_time = models.TimeField(null=True)
  25. discription = models.CharField(null=True, max_length=300)
  26. price = models.IntegerField(null=True)
  27. class Meta:
  28. db_table = "orders_local"
  29. verbose_name = "Заказ (local)"
  30. verbose_name_plural = "Заказы (local)"