Lengow/orders/models.py

27 lines
1.1 KiB
Python
Raw Normal View History

# coding=utf-8
from __future__ import unicode_literals
from django.db import models
class Order(models.Model):
# TODO: Revoir les max_length (difficile d'affirmer une limite précise avec le XML)
marketplace = models.CharField(max_length=10)
idFlux = models.IntegerField()
order_id = models.CharField(max_length=10)
order_mrid = models.CharField(max_length=10)
order_refid = models.CharField(max_length=10)
order_external_id = models.CharField(max_length=10)
# Colonne unique pour le order_purchase_date et order_purchase_heure because DateTime
# TODO: Le prendre en compte lors de la réception du XML puis de l'insertion en base
order_purchase = models.DateTimeField()
order_amount = models.FloatField()
order_tax = models.FloatField()
order_shipping = models.FloatField()
order_commission = models.FloatField()
order_processing_fee = models.FloatField()
order_comments = models.TextField()
customer_id = models.CharField(max_length=10)
order_ip = models.GenericIPAddressField()
order_items = models.IntegerField()