from django.db import models


# Create your models here.

class Coupons(models.Model):
    id : models.AutoField(primary_key=True)
    title = models.CharField(max_length=255, default="", null=False, blank=False)
    code = models.CharField(max_length=255, default="", null=False, blank=False)
    coupon_types = ((0, 'Percentage'), (1, 'Cash'))
    coupon_type = models.IntegerField(default=0, choices=coupon_types)
    value = models.CharField(max_length=255,default=0, blank=False, null=False)    
    max_value = models.CharField(max_length=255,default=0, blank=False, null=False)  
    count = models.CharField(max_length=255,default=0, blank=False, null=False)
    description = models.TextField(default="", null=False, blank=False)
    created_at = models.DateTimeField(auto_now_add=True)   
    updated_at = models.DateTimeField(auto_now_add=True)