Dégrossissement du model order, des sous-models sont à venir
This commit is contained in:
parent
48b6000a5e
commit
0d5876fda5
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,6 +1,7 @@
|
||||
# Project
|
||||
|
||||
# ...
|
||||
db.sqlite3
|
||||
orders/migrations
|
||||
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
|
@ -31,6 +31,7 @@ ALLOWED_HOSTS = []
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'orders.apps.OrdersConfig',
|
||||
'django.contrib.admin',
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
|
@ -1,5 +1,26 @@
|
||||
# coding=utf-8
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
|
||||
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()
|
||||
|
Loading…
Reference in New Issue
Block a user