from django.db import models
from django.forms import forms
from django.forms import ModelForm
from datetime import date

from domain.models import Domain

# Create your models here.
class RevisionState(models.Model):
    name = models.CharField(max_length=10, unique=True)

    class Meta:
        db_table = 'revision_state'

    def __unicode__(self):
        return self.name


class Revision(models.Model):
    domain = models.ForeignKey(Domain)
    revisionstate = models.ForeignKey(RevisionState)
    name = models.CharField(max_length=100)
#    is_activated = models.BooleanField(default=False)
    created_at = models.DateTimeField(auto_now=True, auto_now_add=True)
    updated_at = models.DateTimeField(auto_now=True, auto_now_add=True)

    class Meta:
        db_table = 'revision'

    def __unicode__(self):
        return self.name
