2016-02-12 14:03:00 +00:00
|
|
|
# coding=utf-8
|
2016-02-12 13:02:37 +00:00
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
from django.db import models
|
|
|
|
|
2016-02-12 14:03:00 +00:00
|
|
|
|
|
|
|
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()
|