séparation des application pols et vehicles
This commit is contained in:
23
vehicles/models.py
Normal file
23
vehicles/models.py
Normal file
@@ -0,0 +1,23 @@
|
||||
import datetime
|
||||
|
||||
from django.db import models
|
||||
from django.conf import settings
|
||||
from django.utils import timezone
|
||||
|
||||
|
||||
class Vehicles(models.Model):
|
||||
sName = models.CharField (max_length=250)
|
||||
bEnabled = models.BooleanField( default=0 )
|
||||
|
||||
class Vhc_problems(models.Model):
|
||||
Vehicle = models.ForeignKey( Vehicles, on_delete=models.CASCADE)
|
||||
sTitle = models.CharField( max_length=250)
|
||||
sDesc = models.TextField()
|
||||
bEnabled = models.BooleanField( default=1)
|
||||
dtStart = models.DateTimeField()
|
||||
dtEnd = models.DateTimeField()
|
||||
sAuthor = models.CharField( max_length=120)
|
||||
Author = models.ForeignKey( settings.AUTH_USER_MODEL, on_delete=models.DO_NOTHING )
|
||||
dtUpdated = models.DateTimeField('date updated')
|
||||
dtCreated = models.DateTimeField('date published')
|
||||
|
Reference in New Issue
Block a user