class Skill(models.Model): dev = models.ForeignKey(foreign_key="Developer") name = models.CharField(max_length=64) specialization = models.ArrayField(null=True, value_type="text", db_index=True) notes = models.TextField(null=True)
class Book(models.Model): name = models.CharField(max_length=50) content = models.CharField(max_length=255, choices=BOOK_CHOICES) date_created = models.DateField(auto_now=True) author = models.ForeignKey(foreign_key="Author", null=True) price = models.DecimalField(default=25) quantity = models.IntegerField(default=1) @staticmethod def its_a_2(): return 2 class Meta: table_name = "library" ordering = ["-id"] unique_together = ["name", "content"]
class Book(models.Model): name = models.CharField(max_length=50) content = models.CharField(max_length=255, choices=BOOK_CHOICES) date_created = models.DateField(auto_now=True) author = models.ForeignKey(foreign_key='Author', null=True) price = models.DecimalField(default=25) quantity = models.IntegerField(default=1) def its_a_2(self): return 2 class Meta(): table_name = 'library' ordering = [ '-id', ] unique_together = ['name', 'content']
class Client(models.Model): name = models.CharField(max_length=10) dev = models.ForeignKey(foreign_key='Developer') appoinment = models.ForeignKey(foreign_key='Appointment', null=True)