2023-12-06 15:11:05 +00:00
# Generated by Django 4.2.7 on 2023-12-06 11:35
2023-12-06 11:15:46 +00:00
from django . conf import settings
import django . core . validators
from django . db import migrations , models
import django . db . models . deletion
import membership . models
class Migration ( migrations . Migration ) :
initial = True
dependencies = [
( ' sites ' , ' 0002_alter_domain_unique ' ) ,
( ' auth ' , ' 0012_alter_user_first_name_max_length ' ) ,
]
operations = [
migrations . CreateModel (
name = ' CustomUser ' ,
fields = [
( ' id ' , models . BigAutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
( ' password ' , models . CharField ( max_length = 128 , verbose_name = ' password ' ) ) ,
( ' last_login ' , models . DateTimeField ( blank = True , null = True , verbose_name = ' last login ' ) ) ,
( ' name ' , models . CharField ( max_length = 50 , validators = [ membership . models . validate_name ] ) ) ,
( ' email ' , models . EmailField ( max_length = 254 , unique = True ) ) ,
( ' username ' , models . CharField ( max_length = 60 , null = True , unique = True ) ) ,
( ' validated ' , models . IntegerField ( choices = [ ( 0 , ' Not validated ' ) , ( 1 , ' Validated ' ) ] , default = 0 ) ) ,
( ' in_ldap ' , models . BooleanField ( default = False ) ) ,
( ' validation_slug ' , models . CharField ( db_index = True , default = membership . models . get_validation_slug , max_length = 50 , unique = True ) ) ,
( ' is_admin ' , models . BooleanField ( default = False , help_text = ' Designates whether the user can log into this admin site. ' , verbose_name = ' staff status ' ) ) ,
( ' import_stripe_bill_remark ' , models . TextField ( default = ' ' , help_text = ' Indicates any issues while importing stripe bills ' ) ) ,
( ' groups ' , models . ManyToManyField ( blank = True , help_text = ' The groups this user belongs to. A user will get all permissions granted to each of their groups. ' , related_name = ' user_set ' , related_query_name = ' user ' , to = ' auth.group ' , verbose_name = ' groups ' ) ) ,
( ' site ' , models . ForeignKey ( default = 1 , on_delete = django . db . models . deletion . CASCADE , to = ' sites.site ' ) ) ,
( ' user_permissions ' , models . ManyToManyField ( blank = True , help_text = ' Specific permissions for this user. ' , related_name = ' user_set ' , related_query_name = ' user ' , to = ' auth.permission ' , verbose_name = ' user permissions ' ) ) ,
] ,
options = {
' abstract ' : False ,
} ,
) ,
migrations . CreateModel (
name = ' DeletedUser ' ,
fields = [
( ' id ' , models . BigAutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
( ' user_id ' , models . PositiveIntegerField ( ) ) ,
( ' name ' , models . CharField ( max_length = 254 ) ) ,
( ' email ' , models . EmailField ( max_length = 254 , unique = True ) ) ,
( ' deleted_at ' , models . DateTimeField ( auto_now_add = True ) ) ,
] ,
) ,
migrations . CreateModel (
name = ' StripeCustomer ' ,
fields = [
( ' id ' , models . BigAutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
( ' stripe_id ' , models . CharField ( max_length = 100 , unique = True ) ) ,
( ' user ' , models . OneToOneField ( on_delete = django . db . models . deletion . CASCADE , to = settings . AUTH_USER_MODEL ) ) ,
] ,
) ,
migrations . CreateModel (
name = ' CreditCards ' ,
fields = [
( ' id ' , models . BigAutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
( ' name ' , models . CharField ( max_length = 50 ) ) ,
( ' card_number ' , models . CharField ( max_length = 50 ) ) ,
( ' expiry_date ' , models . CharField ( max_length = 50 , validators = [ django . core . validators . RegexValidator ( ' \\ d {2} \\ / \\ d {4} ' , ' Use this pattern(MM/YYYY). ' ) ] ) ) ,
( ' ccv ' , models . CharField ( max_length = 4 , validators = [ django . core . validators . RegexValidator ( ' \\ d { 3,4} ' , ' Wrong CCV number. ' ) ] ) ) ,
( ' payment_type ' , models . CharField ( default = ' N ' , max_length = 5 ) ) ,
( ' user_id ' , models . ForeignKey ( on_delete = django . db . models . deletion . CASCADE , to = settings . AUTH_USER_MODEL ) ) ,
] ,
) ,
migrations . CreateModel (
name = ' Calendar ' ,
fields = [
( ' id ' , models . BigAutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
( ' datebooked ' , models . DateField ( ) ) ,
( ' user ' , models . ForeignKey ( on_delete = django . db . models . deletion . CASCADE , to = settings . AUTH_USER_MODEL ) ) ,
] ,
) ,
]