from django.contrib.auth.models import User
from django.db import models

# Create your models here.


class Storage(models.Model):
    name = models.CharField(max_length=20)
    user = models.ForeignKey(User, related_name='storages', on_delete=models.CASCADE)

    def __str__(self):
        return '{} {}'.format(self.user.username, self.name)


class Coin(models.Model):
    symbol = models.CharField(max_length=6)
    value = models.DecimalField(max_digits=15, decimal_places=6)
    storage = models.ForeignKey(Storage, related_name='coins', on_delete=models.CASCADE)

    def __str__(self):
        return '{} {} {}'.format(self.storage.user.username, self.storage.name, self.symbol)

1daa2ef25aacd9567d6210f43d53b64ab2d738b3
<mask token>


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


class Coin(models.Model):
    symbol = models.CharField(max_length=6)
    value = models.DecimalField(max_digits=15, decimal_places=6)
    storage = models.ForeignKey(Storage, related_name='coins', on_delete=
        models.CASCADE)

    def __str__(self):
        return '{} {} {}'.format(self.storage.user.username, self.storage.
            name, self.symbol)

<mask token>


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

    def __str__(self):
        return '{} {}'.format(self.user.username, self.name)


class Coin(models.Model):
    symbol = models.CharField(max_length=6)
    value = models.DecimalField(max_digits=15, decimal_places=6)
    storage = models.ForeignKey(Storage, related_name='coins', on_delete=
        models.CASCADE)

    def __str__(self):
        return '{} {} {}'.format(self.storage.user.username, self.storage.
            name, self.symbol)

<mask token>


class Storage(models.Model):
    name = models.CharField(max_length=20)
    user = models.ForeignKey(User, related_name='storages', on_delete=
        models.CASCADE)

    def __str__(self):
        return '{} {}'.format(self.user.username, self.name)


class Coin(models.Model):
    symbol = models.CharField(max_length=6)
    value = models.DecimalField(max_digits=15, decimal_places=6)
    storage = models.ForeignKey(Storage, related_name='coins', on_delete=
        models.CASCADE)

    def __str__(self):
        return '{} {} {}'.format(self.storage.user.username, self.storage.
            name, self.symbol)

from django.contrib.auth.models import User
from django.db import models


class Storage(models.Model):
    name = models.CharField(max_length=20)
    user = models.ForeignKey(User, related_name='storages', on_delete=
        models.CASCADE)

    def __str__(self):
        return '{} {}'.format(self.user.username, self.name)


class Coin(models.Model):
    symbol = models.CharField(max_length=6)
    value = models.DecimalField(max_digits=15, decimal_places=6)
    storage = models.ForeignKey(Storage, related_name='coins', on_delete=
        models.CASCADE)

    def __str__(self):
        return '{} {} {}'.format(self.storage.user.username, self.storage.
            name, self.symbol)

from django.contrib.auth.models import User
from django.db import models

# Create your models here.


class Storage(models.Model):
    name = models.CharField(max_length=20)
    user = models.ForeignKey(User, related_name='storages', on_delete=models.CASCADE)

    def __str__(self):
        return '{} {}'.format(self.user.username, self.name)


class Coin(models.Model):
    symbol = models.CharField(max_length=6)
    value = models.DecimalField(max_digits=15, decimal_places=6)
    storage = models.ForeignKey(Storage, related_name='coins', on_delete=models.CASCADE)

    def __str__(self):
        return '{} {} {}'.format(self.storage.user.username, self.storage.name, self.symbol)
