from django.db import models
# -*- coding: iso-8859-2 -*-
# Create your models here.


class Predavac(models.Model):
    meno = models.CharField(max_length=30)
    def __unicode__(self):
        return u"%s" % (self.meno)

class Kategoria(models.Model):
    nazov = models.CharField(max_length=30)
    def __unicode__(self):
        return u"%s" % (self.nazov)

class Tovar(models.Model):
    nazov = models.CharField(max_length=30)
    cena = models.IntegerField()
    kolko_na_sklade = models.IntegerField()
    kategoria = models.ForeignKey(Kategoria)
    def __unicode__(self):
        return u"%s - %d" % (self.nazov,self.kolko_na_sklade)
