init
This commit is contained in:
21
backend-django/backend/models/garnison.py
Normal file
21
backend-django/backend/models/garnison.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from django.db import models
|
||||
|
||||
|
||||
class Garnison(models.Model):
|
||||
"""
|
||||
Modèle des garnisons
|
||||
"""
|
||||
|
||||
class Cols():
|
||||
""" Constantes pour les noms de colonnes """
|
||||
|
||||
PK = 'gar_id'
|
||||
LIEU = 'gar_lieu'
|
||||
CODE_POSTAL = 'gar_code_postal'
|
||||
|
||||
gar_id = models.CharField(max_length=100, primary_key=True)
|
||||
gar_lieu = models.CharField(max_length=100, verbose_name="Garnison")
|
||||
gar_code_postal = models.CharField(max_length=100, null=True, blank=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.gar_lieu
|
||||
Reference in New Issue
Block a user