Last active
November 29, 2016 13:58
-
-
Save craigderington/799df26729f7aeb4c40281147b347693 to your computer and use it in GitHub Desktop.
Customer Model
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# models.py | |
from django.db import models | |
class Customer(models.Model): | |
company = models.ForeignKey('Company', null=False) | |
customer_first_name = models.CharField(null=False, blank=False, max_length=50) | |
customer_last_name = models.CharField(null=False, blank=False, max_length=50) | |
customer_email = models.CharField(null=False, blank=False, max_length=80) | |
account_number = models.CharField(null=False, blank=False, max_length=20) | |
address1 = models.CharField(null=False, blank=False, max_length=50) | |
address2 = models.CharField(null=False, blank=False, max_length=20) | |
city = models.CharField(null=False, blank=False, max_length=50) | |
state = models.CharField(null=False, blank=False, max_length=2) | |
customer_email = models.CharField(null=False, blank=False, max_length=80) | |
primary_phone = models.CharField(null=False, blank=False, max_length=12) | |
class Meta: | |
verbose_name = 'Customer' | |
verbose_name_plural = 'Customers' | |
ordering = ['-id'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment