from django.db import models

from v1.utils.models.core import CoreModel


class TagDesign(CoreModel):
    """
    Tag Design model.

    Tags designs relationship
    """

    tag = models.ForeignKey(
        "tags.Tag",
        on_delete=models.CASCADE,
        related_name="tag_designs",
    )
    design = models.ForeignKey(
        "designs.Design",
        on_delete=models.CASCADE,
        related_name="tag_designs"
    )

    class Meta:
        unique_together = ("tag", "design")
        ordering = ["-id"]
        get_latest_by = "created"

    def __str__(self):
        return "{}".format(self.pk)

bbbafdf138e3e713b29078b1d2d106cfa649cb74
<mask token>


class TagDesign(CoreModel):
    <mask token>
    <mask token>
    <mask token>


    class Meta:
        unique_together = 'tag', 'design'
        ordering = ['-id']
        get_latest_by = 'created'

    def __str__(self):
        return '{}'.format(self.pk)

<mask token>


class TagDesign(CoreModel):
    <mask token>
    tag = models.ForeignKey('tags.Tag', on_delete=models.CASCADE,
        related_name='tag_designs')
    design = models.ForeignKey('designs.Design', on_delete=models.CASCADE,
        related_name='tag_designs')


    class Meta:
        unique_together = 'tag', 'design'
        ordering = ['-id']
        get_latest_by = 'created'

    def __str__(self):
        return '{}'.format(self.pk)

<mask token>


class TagDesign(CoreModel):
    """
    Tag Design model.

    Tags designs relationship
    """
    tag = models.ForeignKey('tags.Tag', on_delete=models.CASCADE,
        related_name='tag_designs')
    design = models.ForeignKey('designs.Design', on_delete=models.CASCADE,
        related_name='tag_designs')


    class Meta:
        unique_together = 'tag', 'design'
        ordering = ['-id']
        get_latest_by = 'created'

    def __str__(self):
        return '{}'.format(self.pk)

from django.db import models
from v1.utils.models.core import CoreModel


class TagDesign(CoreModel):
    """
    Tag Design model.

    Tags designs relationship
    """
    tag = models.ForeignKey('tags.Tag', on_delete=models.CASCADE,
        related_name='tag_designs')
    design = models.ForeignKey('designs.Design', on_delete=models.CASCADE,
        related_name='tag_designs')


    class Meta:
        unique_together = 'tag', 'design'
        ordering = ['-id']
        get_latest_by = 'created'

    def __str__(self):
        return '{}'.format(self.pk)

from django.db import models

from v1.utils.models.core import CoreModel


class TagDesign(CoreModel):
    """
    Tag Design model.

    Tags designs relationship
    """

    tag = models.ForeignKey(
        "tags.Tag",
        on_delete=models.CASCADE,
        related_name="tag_designs",
    )
    design = models.ForeignKey(
        "designs.Design",
        on_delete=models.CASCADE,
        related_name="tag_designs"
    )

    class Meta:
        unique_together = ("tag", "design")
        ordering = ["-id"]
        get_latest_by = "created"

    def __str__(self):
        return "{}".format(self.pk)
