From 879aa95478496b9d0d5ed9336d465046896c9bc1 Mon Sep 17 00:00:00 2001 From: docteur_mucus Date: Tue, 28 May 2019 10:59:47 +0200 Subject: [PATCH] Update 'port/models.py' --- port/models.py | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/port/models.py b/port/models.py index d03e41b..8c07eb5 100644 --- a/port/models.py +++ b/port/models.py @@ -1,41 +1,42 @@ from django.db import models class Address(models.Model): - address = - zip_code = - city = - country = + address = models.CharField(max_length=200) + zip_code = models.CharField(max_length=200) + city = models.CharField(max_length=200) + country = models.CharField(max_length=200) class Person(models.Model): name = models.CharField(max_length=200) surname = models.CharField(max_length=200) - address = - nationality = - email = + address = Address() + nationality = models.CharField(max_length=200) + email = models.EmailField(max_length=254) phone = class Company(models.Model): - name = - address = - siret = + name = models.CharField(max_length=200) + address = Address() class Insurance(Company): pass class Boat(models.Model): - name = + name = models.CharField(max_length=200) registration_num = length = beam = water_draught = tonnage = water_tank = - model = - heating = + model = models.CharField(max_length=200) + heating = models.CharField(max_length=200) + passenger_capacity = + picture = models.ImageField(upload_to=None, height_field=None, width_field=None, max_length=100) class Port(models.Model): - name = - address = + name = models.CharField(max_length=200) + address = Address() class Dock(models.Model): num = @@ -54,21 +55,23 @@ class Tap(models.Model): class Stay(models.Model): arrival = models.DateTimeField('date published') departure = models.DateTimeField('date published') - coming_from = - going_to = + coming_from = models.CharField(max_length=200) + going_to = models.CharField(max_length=200) + num_passenger = + num_guest = class Payment(models.Model): num = date = models.DateTimeField('date published') - pay_type = + pay_type = models.CharField(max_length=200) amount = class Bill_line(models.Model): - service = + service = models.CharField(max_length=200) quantity = class Service(models.Model): - service_type = + service_type = models.CharField(max_length=200) # Create your models here.