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

# Create your models here.
class domains(models.Model):
    user = models.ForeignKey(User, on_delete=models.CASCADE)
    domain = models.CharField(max_length=100, unique=True)
    publish_date = models.DateField(auto_now_add=True)
    visitor = models.IntegerField(default=1)

    def __str__(self):
        return self.domain

    class Meta:
        verbose_name = 'Domain'
        verbose_name_plural = 'Custom Domain'
