from __future__ import unicode_literals

from django.db import models
from usuaris.models import Perfil
from supers.models import Superheroi


class Districte(models.Model):
    nom=models.CharField(max_length=200)
    
    #per retornar el nom
    def __str__(self):
        return self.nom


#DENUNCIA
class Denuncia(models.Model):
    data=models.DateTimeField(auto_now_add=True)
    districte=models.ForeignKey(Districte,on_delete=models.CASCADE,)
    supervillano=models.ForeignKey('supers.Supervillano',on_delete=models.CASCADE)
    observacions=models.CharField(max_length=200,default="", blank=True)


#DELICTE
class Delicte(models.Model):
    denuncia=models.OneToOneField(Denuncia,on_delete=models.CASCADE,)
    policia=models.ForeignKey('usuaris.Perfil',on_delete=models.CASCADE,)
    superheroi=models.ForeignKey('supers.Superheroi',)
    haGuanyatelBe=models.NullBooleanField()

    

0e9859775371cef8a32b1d65d8e7234cbc63d12d
<mask token>


class Denuncia(models.Model):
    <mask token>
    <mask token>
    <mask token>
    <mask token>


class Delicte(models.Model):
    denuncia = models.OneToOneField(Denuncia, on_delete=models.CASCADE)
    policia = models.ForeignKey('usuaris.Perfil', on_delete=models.CASCADE)
    superheroi = models.ForeignKey('supers.Superheroi')
    haGuanyatelBe = models.NullBooleanField()

<mask token>


class Districte(models.Model):
    <mask token>
    <mask token>


class Denuncia(models.Model):
    data = models.DateTimeField(auto_now_add=True)
    districte = models.ForeignKey(Districte, on_delete=models.CASCADE)
    supervillano = models.ForeignKey('supers.Supervillano', on_delete=
        models.CASCADE)
    observacions = models.CharField(max_length=200, default='', blank=True)


class Delicte(models.Model):
    denuncia = models.OneToOneField(Denuncia, on_delete=models.CASCADE)
    policia = models.ForeignKey('usuaris.Perfil', on_delete=models.CASCADE)
    superheroi = models.ForeignKey('supers.Superheroi')
    haGuanyatelBe = models.NullBooleanField()

<mask token>


class Districte(models.Model):
    nom = models.CharField(max_length=200)

    def __str__(self):
        return self.nom


class Denuncia(models.Model):
    data = models.DateTimeField(auto_now_add=True)
    districte = models.ForeignKey(Districte, on_delete=models.CASCADE)
    supervillano = models.ForeignKey('supers.Supervillano', on_delete=
        models.CASCADE)
    observacions = models.CharField(max_length=200, default='', blank=True)


class Delicte(models.Model):
    denuncia = models.OneToOneField(Denuncia, on_delete=models.CASCADE)
    policia = models.ForeignKey('usuaris.Perfil', on_delete=models.CASCADE)
    superheroi = models.ForeignKey('supers.Superheroi')
    haGuanyatelBe = models.NullBooleanField()

from __future__ import unicode_literals
from django.db import models
from usuaris.models import Perfil
from supers.models import Superheroi


class Districte(models.Model):
    nom = models.CharField(max_length=200)

    def __str__(self):
        return self.nom


class Denuncia(models.Model):
    data = models.DateTimeField(auto_now_add=True)
    districte = models.ForeignKey(Districte, on_delete=models.CASCADE)
    supervillano = models.ForeignKey('supers.Supervillano', on_delete=
        models.CASCADE)
    observacions = models.CharField(max_length=200, default='', blank=True)


class Delicte(models.Model):
    denuncia = models.OneToOneField(Denuncia, on_delete=models.CASCADE)
    policia = models.ForeignKey('usuaris.Perfil', on_delete=models.CASCADE)
    superheroi = models.ForeignKey('supers.Superheroi')
    haGuanyatelBe = models.NullBooleanField()

from __future__ import unicode_literals

from django.db import models
from usuaris.models import Perfil
from supers.models import Superheroi


class Districte(models.Model):
    nom=models.CharField(max_length=200)
    
    #per retornar el nom
    def __str__(self):
        return self.nom


#DENUNCIA
class Denuncia(models.Model):
    data=models.DateTimeField(auto_now_add=True)
    districte=models.ForeignKey(Districte,on_delete=models.CASCADE,)
    supervillano=models.ForeignKey('supers.Supervillano',on_delete=models.CASCADE)
    observacions=models.CharField(max_length=200,default="", blank=True)


#DELICTE
class Delicte(models.Model):
    denuncia=models.OneToOneField(Denuncia,on_delete=models.CASCADE,)
    policia=models.ForeignKey('usuaris.Perfil',on_delete=models.CASCADE,)
    superheroi=models.ForeignKey('supers.Superheroi',)
    haGuanyatelBe=models.NullBooleanField()

    
