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


# Create your models here.

class Product(models.Model):
    image = models.ImageField(upload_to="media/", verbose_name="Картинка")
    name = models.CharField(max_length=100)
    desc = models.TextField(max_length=500)
    title = models.CharField(max_length=100, default="Product")


class AdvUser(AbstractUser):
    name = models.CharField(max_length=250, verbose_name="ФИО", help_text="Только кириллические буквы, дефис и пробелы")
    username = models.CharField(max_length=35, verbose_name="Логин", unique=True,
                                help_text="Только латиница и дефис, уникальный")
    avatar = models.ImageField(upload_to="media/", verbose_name="Аватарка", default= None)


class Meta(AbstractUser.Meta):
    pass
