12345678910111213141516171819202122232425262728293031323334353637383940 |
- from email.policy import default
- from django.db import models
- from django.utils import timezone
- from django.template.defaultfilters import slugify
- class Clinique(models.Model):
- CLIN_Nom = models.CharField("Nom de Clinique", max_length=64, unique=True)
- CLIN_Anag = models.CharField("Anagrame de Clinique", max_length=3, unique=True)
-
- def __str__(self):
- return self.CLIN_Nom
- class Meta:
- verbose_name = "Clinique"
- verbose_name_plural = "Cliniques"
-
- class Batiments(models.Model):
- BAT_Clin = models.ForeignKey(Clinique, on_delete=models.PROTECT)
- BAT_Nom = models.CharField("Nom du Batiments", max_length=64, unique=True)
- BAT_Anag = models.CharField("Anagrame du Batiments", max_length=2, unique=True)
-
- def __str__(self):
- return self.BAT_Nom
- class Meta:
- verbose_name = "Batiment"
- verbose_name_plural = "Batiments"
-
- class Services(models.Model):
- SERVICE_Clin = models.ForeignKey(Clinique, on_delete=models.PROTECT)
- SERVICE_Nom = models.CharField("Nom du Service", max_length=64, unique=True)
- SERVICE_Anag = models.CharField("Anagrame du Service", max_length=2, unique=True)
-
- def __str__(self):
- return self.SERVICE_Nom
- class Meta:
- verbose_name = "Service"
- verbose_name_plural = "Services"
|