Skip to content

Instantly share code, notes, and snippets.

@craigderington craigderington/models.py
Last active Nov 29, 2016

Embed
What would you like to do?
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
You can’t perform that action at this time.