from django.db import models
from utente.models import *
from documento.models import *
from azienda.models import *

import datetime

from utente.models import *
from azienda.models import *
from documento.models import *
from amministratore.models import *

class Causale(models.Model):
  nome = models.CharField(max_length=32,default='',null=False)
  schema = models.CharField(max_length=128,default='',null=False)

class Attivita(models.Model):
  data = models.DateTimeField(default=datetime.datetime(2024, 1, 1, 21, 43, 52, 352359))
  causale = models.ForeignKey(Causale,null=True,on_delete=models.PROTECT,default=None)
  valore = models.CharField(max_length=128,default='',null=False)
  utente = models.ForeignKey(Utente,null=True,on_delete=models.CASCADE,default=None)
  documento = models.ForeignKey(Documento,null=True,on_delete=models.CASCADE,default=None)
  azienda = models.ForeignKey(Azienda,null=True,on_delete=models.CASCADE,default=None)
  amministratore = models.ForeignKey(Amministratore,null=True,on_delete=models.CASCADE,default=None)

