Pastebin
Paste #24999: No description
< previous paste - next paste>
Pasted by Anonymous Coward
from django.db import models from django.utils import timezone from django.conf import settings class Customer(models.Model): name = models.CharField(max_length=200) email = models.CharField(max_length=200, blank=True, null=True) phone_number = models.CharField(max_length=200, blank=True, null=True) address = models.CharField(max_length=200, blank=True, null=True) logo_path = models.CharField(max_length=200, blank=True, null=True) created_on = models.DateTimeField(default=timezone.now) def __str__(self): return self.name class DealStage(models.Model): created_on = models.DateTimeField(default=timezone.now) name = models.CharField(max_length=200) sort_order = models.IntegerField(default=0) def __str__(self): return self.name class LeadStage(models.Model): created_on = models.DateTimeField(default=timezone.now) name = models.CharField(max_length=200) sort_order = models.IntegerField(default=0) def __str__(self): return self.name class Deal(models.Model): title = models.CharField(max_length=200) customer = models.ForeignKey(Customer, on_delete=models.PROTECT) stage = models.ForeignKey(DealStage, on_delete=models.PROTECT) amount = models.DecimalField(max_digits=10, decimal_places=2) description = models.TextField(blank=True, null=True) notes = models.TextField(blank=True, null=True) created_on = models.DateTimeField(default=timezone.now) expected_close_date = models.DateField(blank=True, null=True) owner = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.SET_NULL, null=True) def __str__(self): return self.title class Lead(models.Model): title = models.CharField(max_length=200, blank=True, null=True) company_name = models.CharField(max_length=200, blank=True, null=True) contact_name = models.CharField(max_length=200, blank=True, null=True) contact_email = models.CharField(max_length=200, blank=True, null=True) contact_phone = models.CharField(max_length=200, blank=True, null=True) contact_title = models.CharField(max_length=200, blank=True, null=True) contact_other = models.CharField(max_length=200, blank=True, null=True) company_address = models.CharField(max_length=200, blank=True, null=True) company_country = models.CharField(max_length=200, blank=True, null=True) message = models.TextField(blank=True, null=True) notes = models.TextField(blank=True, null=True) status = models.ForeignKey(LeadStage, on_delete=models.PROTECT) source = models.CharField(max_length=200, blank=True, null=True) created_on = models.DateTimeField(default=timezone.now) def __str__(self): return self.title
New Paste
Go to most recent paste.