class Profile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) middle_name = models.CharField(max_length=50, blank=True, null=True) job_title = models.CharField(max_length=80, blank=True, null=True) address = models.CharField(max_length=100, blank=True, null=True) office_phone = PhoneField(blank=True, help_text='Office contact number') cell_phone = PhoneField(blank=True, help_text='Cell contact number') prefix_choices = [('Mr', 'Mr'), ('Ms', 'Ms'), ('Mrs', 'Mrs'), ('Dr', 'Dr')] prefix = models.CharField(max_length=4, choices=prefix_choices, default=None) company = models.ForeignKey(Client, on_delete=models.CASCADE) def __str__(self): return self.user.username
class Min_Praiseworship(models.Model): OPTIONS = [ ('male', 'Male'), ('female', 'Female'), ] CHOICES = [ ('single', 'Single'), ('married', 'Married'), ('widowed', 'Widowed'), ('divorced', 'Divorced'), ] MINI = [ ('teach', 'Teaching'), ('pray', 'Intercessor'), ('evan', 'Evangelical'), ('visit', 'Visitation'), ('steward', 'Steward'), ('praise', 'Praise and Worship'), ] first_name = models.CharField(max_length=200, null=True) middle_name = models.CharField(max_length=200, null=True) last_name = models.CharField(max_length=200, null=True) gender = models.CharField(max_length=100, choices=OPTIONS, default='male') birthdate = models.DateField(default="1900-01-31") phone_number = PhoneField(blank=True) marital_status = models.CharField(max_length=100, choices=CHOICES, default='single') email = models.EmailField(blank=True) next_of_kin = models.CharField(max_length=255) next_of_kin_phone = PhoneField(blank=True) family_name = models.CharField(max_length=255) village = models.CharField(max_length=255) home_town = models.CharField(max_length=255) lga_of_origin = models.CharField(max_length=255) state_of_origin = models.CharField(max_length=255) nationality = models.CharField(max_length=255) residential_address = models.CharField(max_length=255) ministry = models.CharField(max_length=255, choices=MINI, default='teach') date_joined = models.DateField(default="1900-01-31") passport = models.ImageField(upload_to='images/%Y/%m/%d/', blank=True) class Meta: db_table = 'min_praiseworship' ordering = ['-first_name'] def __str__(self): return self.first_name
class Pgrp_Account1(models.Model): CHOICES = [ ('debit', 'Debit'), ('credit', 'Credit'), ] MODE = [ ('cash', 'Cash'), ('cheque', 'Cheque'), ] full_name = models.CharField(max_length=200) phone_number = PhoneField(blank=True) credit = models.DecimalField(max_digits=11, decimal_places=2, null=True, blank=True) debit = models.DecimalField(max_digits=11, decimal_places=2, null=True, blank=True) mode = models.CharField(max_length=100, choices=MODE, default='cash') date = models.DateField(("Date"), default=datetime.date.today) description = models.CharField(max_length=300, default='Default') class Meta: db_table = 'pgrp_account1' ordering = ['-date'] def __str__(self): return self.full_name
class Location(models.Model): location_id = models.AutoField(primary_key=True, ) address1 = models.CharField(blank=True, null=True, max_length=100) address2 = models.CharField(blank=True, null=True, max_length=100) city = models.CharField(blank=True, null=True, max_length=50) state = models.CharField(blank=True, null=True, max_length=50) postal_code = models.CharField(max_length=5, default=77777) country = models.CharField(blank=True, null=True, max_length=50) phone_number = PhoneField(blank=True, null=True) fax_number = PhoneField(blank=True, null=True) client = models.ForeignKey(Client, on_delete=models.DO_NOTHING, null=True, related_name='client') def __str__(self): return self.address1 + ', ' + self.city + ', ' + self.state def __unicode__(self): return self.address1 + ', ' + self.city + ', ' + self.state
class Customer(models.Model): fname = models.CharField(max_length=255) lname = models.CharField(max_length=255) phoneNumber = PhoneField(blank=False, null=False, unique=True, help_text='Contact phone number')
class Evangelism(models.Model): OPTIONS = ( ('male', 'Male'), ('female', 'Female'), ) CHOICES = [ ('single', 'Single'), ('married', 'Married'), ('widowed', 'Widowed'), ('divorced', 'Divorced'), ('teach', 'Teaching'), ('pray', 'Intercessor'), ('evan', 'Evangelical'), ('visit', 'Visitation'), ('steward', 'Steward'), ('praise', 'Praise and Worship'), ] first_name = models.CharField(max_length=200, null=True) middle_name = models.CharField(max_length=200, null=True) last_name = models.CharField(max_length=200, null=True) gender = models.CharField(max_length=100, choices=OPTIONS, default='male') birthdate = models.DateField() phone_number = PhoneField() marital_status = models.CharField(max_length=100, choices=CHOICES, default='single') email = models.EmailField() next_of_kin = models.CharField(max_length=255) nok_phone = PhoneField() family_name = models.CharField(max_length=255) village = models.CharField(max_length=255) home_town = models.CharField(max_length=255) lga_of_origin = models.CharField(max_length=255) state_of_origin = models.CharField(max_length=255) nationality = models.CharField(max_length=255) residential_address = models.CharField(max_length=255) ministry = models.CharField(max_length=255, choices=CHOICES, default='teach') date_joined = models.DateField() class Meta: db_table = 'evangelism'
class Product(models.Model): item = models.CharField(max_length=200) qty = models.IntegerField() brand = models.CharField(max_length=255, unique=True) prize = MoneyField(max_digits=11, decimal_places=2, default_currency='USD') tel = PhoneField() date = models.DateTimeField(default=datetime.datetime.now) class Meta: db_table = 'product' def __str__(self): return str(self.item) + ":$" + str(self.price)