Files
Reskreen/vsl/models.py
brocsam b7710390fa Add new VSL app with initial models and admin configuration.
Created VslDest model with fields for ID, name, creation date, and update date.
Added VslConfig to settings.py.
Configured admin interface for VslDest.
Initialized migrations for VslDest model.
Included basic test and view files for future development.
2025-06-04 15:04:13 +00:00

22 lines
809 B
Python

from django.db import models
class VslDest(models.Model):
# ID auto-incrémenté par défaut
id = models.AutoField("ID du Suivi", primary_key=True)
# Champ de chaîne de caractères avec une longueur maximale de 255 caractères
name = models.CharField("Dénomination", max_length=255)
# Champ pour la date de création, automatiquement défini à la création
dtCreate = models.DateTimeField("Date de création", auto_now_add=True)
# Champ pour la date de modification, automatiquement mis à jour à chaque modification
dtUpdate = models.DateTimeField("Date de modification", auto_now=True)
def __str__(self):
return self.name
class Meta:
verbose_name = "Destination VSL"
verbose_name_plural = "Destinations VSL"
ordering = ["id"]