summaryrefslogtreecommitdiff
path: root/app/models.py
diff options
context:
space:
mode:
authorMarius Peter <marius.peter@tutanota.com>2022-07-24 16:01:41 +0200
committerMarius Peter <marius.peter@tutanota.com>2022-07-24 16:01:41 +0200
commit6c45fccc53ed5344461672c412935129c8179863 (patch)
tree8727217e9099014d652be404796b3f6141bea0f0 /app/models.py
parent18a64c63920bdaba1b8348493b8e7eb1cdc81294 (diff)
Models indentation and main database download route.
Diffstat (limited to 'app/models.py')
-rw-r--r--app/models.py65
1 files changed, 32 insertions, 33 deletions
diff --git a/app/models.py b/app/models.py
index 009e507..480cb28 100644
--- a/app/models.py
+++ b/app/models.py
@@ -115,22 +115,22 @@ class Customer(db.Model):
orders = db.relationship("Order", back_populates="customer")
def __init__(
- self,
- name,
- name_alternative,
- code_customer,
- code_accounting,
- address,
- postal_code,
- city,
- country,
- phone,
- website,
- email,
- professional_id_1,
- professional_id_2,
- tax_id,
- payment_terms,
+ self,
+ name,
+ name_alternative,
+ code_customer,
+ code_accounting,
+ address,
+ postal_code,
+ city,
+ country,
+ phone,
+ website,
+ email,
+ professional_id_1,
+ professional_id_2,
+ tax_id,
+ payment_terms,
):
self.name = name
self.name_alternative = name_alternative
@@ -176,15 +176,15 @@ class Invoice(db.Model):
orders = db.relationship("Order", back_populates="invoice")
def __init__(
- self,
- invoice_id_alt,
- customer_id,
- customer_reference,
- date_billed,
- date_due,
- amount_net,
- amount_gross,
- amount_tax,
+ self,
+ invoice_id_alt,
+ customer_id,
+ customer_reference,
+ date_billed,
+ date_due,
+ amount_net,
+ amount_gross,
+ amount_tax,
):
self.invoice_id_alt = invoice_id_alt
self.customer_id = customer_id
@@ -257,13 +257,13 @@ class Product(db.Model):
orders = db.relationship("Order", back_populates="product")
def __init__(
- self,
- name,
- code_accounting,
- unit_weight,
- price_net,
- price_gross,
- tax_rate,
+ self,
+ name,
+ code_accounting,
+ unit_weight,
+ price_net,
+ price_gross,
+ tax_rate,
):
self.name = name
self.code_accounting = code_accounting
@@ -303,7 +303,6 @@ class FertiLog(db.Model):
)
targets = db.relationship("FertiTarget", back_populates="ferti_log")
-
def __init__(self, nno3, p, k, ca, mg, s, na, cl, fe, zn, b, mn, cu, mo, si, nnh4):
self.nno3 = nno3
self.p = p
Copyright 2019--2024 Marius PETER