Skip to content

Instantly share code, notes, and snippets.

@craigderington
Last active November 29, 2016 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save craigderington/799df26729f7aeb4c40281147b347693 to your computer and use it in GitHub Desktop.
Save craigderington/799df26729f7aeb4c40281147b347693 to your computer and use it in GitHub Desktop.
Customer Model
# 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