2015-04-08 14:41:09 +00:00
# -*- coding: utf-8 -*-
2024-07-12 09:41:44 +00:00
# Generated by Django 1.10.5 on 2021-04-22 11:08
2015-04-08 14:41:09 +00:00
from __future__ import unicode_literals
2024-07-12 09:41:44 +00:00
import django . contrib . auth . models
2015-04-08 14:41:09 +00:00
import django . core . validators
2024-07-12 09:41:44 +00:00
from django . db import migrations , models
2021-04-22 12:18:01 +00:00
import django . db . models . deletion
2015-04-08 14:41:09 +00:00
import django . utils . timezone
2024-07-12 09:41:44 +00:00
import orchestra . contrib . accounts . models
2015-04-08 14:41:09 +00:00
class Migration ( migrations . Migration ) :
2015-04-29 14:32:38 +00:00
dependencies = [
( ' systemusers ' , ' 0001_initial ' ) ,
2024-07-12 09:41:44 +00:00
( ' auth ' , ' 0006_require_contenttypes_0002 ' ) ,
2015-04-29 14:32:38 +00:00
]
2015-04-08 14:41:09 +00:00
operations = [
migrations . CreateModel (
name = ' Account ' ,
fields = [
2024-07-12 09:41:44 +00:00
( ' id ' , models . AutoField ( 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 ' ) ) ,
( ' username ' , models . CharField ( help_text = ' Required. 64 characters or fewer. Letters, digits and ./-/_ only. ' , max_length = 32 , unique = True , validators = [ django . core . validators . RegexValidator ( ' ^[ \\ w.-]+$ ' , ' Enter a valid username. ' , ' invalid ' ) ] , verbose_name = ' username ' ) ) ,
( ' short_name ' , models . CharField ( blank = True , max_length = 64 , verbose_name = ' short name ' ) ) ,
( ' full_name ' , models . CharField ( max_length = 256 , verbose_name = ' full name ' ) ) ,
2015-04-29 14:32:38 +00:00
( ' email ' , models . EmailField ( help_text = ' Used for password recovery ' , max_length = 254 , verbose_name = ' email address ' ) ) ,
2024-07-12 09:41:44 +00:00
( ' type ' , models . CharField ( choices = [ ( ' INDIVIDUAL ' , ' Individual ' ) , ( ' ASSOCIATION ' , ' Association ' ) , ( ' CUSTOMER ' , ' Customer ' ) , ( ' COMPANY ' , ' Company ' ) , ( ' PUBLICBODY ' , ' Public body ' ) , ( ' STAFF ' , ' Staff ' ) , ( ' FRIEND ' , ' Friend ' ) ] , default = ' INDIVIDUAL ' , max_length = 32 , verbose_name = ' type ' ) ) ,
( ' language ' , models . CharField ( choices = [ ( ' EN ' , ' English ' ) ] , default = ' EN ' , max_length = 2 , verbose_name = ' language ' ) ) ,
( ' comments ' , models . TextField ( blank = True , max_length = 256 , verbose_name = ' comments ' ) ) ,
( ' is_superuser ' , models . BooleanField ( default = False , help_text = ' Designates that this user has all permissions without explicitly assigning them. ' , verbose_name = ' superuser status ' ) ) ,
( ' is_active ' , models . BooleanField ( default = True , help_text = ' Designates whether this account should be treated as active. Unselect this instead of deleting accounts. ' , verbose_name = ' active ' ) ) ,
( ' date_joined ' , models . DateTimeField ( default = django . utils . timezone . now , verbose_name = ' date joined ' ) ) ,
( ' main_systemuser ' , models . ForeignKey ( editable = False , null = True , on_delete = django . db . models . deletion . CASCADE , related_name = ' accounts_main ' , to = ' systemusers.SystemUser ' ) ) ,
2015-04-08 14:41:09 +00:00
] ,
options = {
' abstract ' : False ,
} ,
managers = [
( ' objects ' , django . contrib . auth . models . UserManager ( ) ) ,
] ,
) ,
2024-07-12 09:41:44 +00:00
migrations . AlterModelManagers (
name = ' account ' ,
managers = [
( ' objects ' , orchestra . contrib . accounts . models . AccountManager ( ) ) ,
] ,
) ,
migrations . AlterField (
model_name = ' account ' ,
name = ' language ' ,
field = models . CharField ( choices = [ ( ' CA ' , ' Catalan ' ) , ( ' ES ' , ' Spanish ' ) , ( ' EN ' , ' English ' ) ] , default = ' CA ' , max_length = 2 , verbose_name = ' language ' ) ,
) ,
migrations . AlterField (
model_name = ' account ' ,
name = ' type ' ,
field = models . CharField ( choices = [ ( ' INDIVIDUAL ' , ' Individual ' ) , ( ' ASSOCIATION ' , ' Association ' ) , ( ' CUSTOMER ' , ' Customer ' ) , ( ' STAFF ' , ' Staff ' ) , ( ' FRIEND ' , ' Friend ' ) ] , default = ' INDIVIDUAL ' , max_length = 32 , verbose_name = ' type ' ) ,
) ,
migrations . AlterField (
model_name = ' account ' ,
name = ' username ' ,
field = models . CharField ( help_text = ' Required. 32 characters or fewer. Letters, digits and ./-/_ only. ' , max_length = 32 , unique = True , validators = [ django . core . validators . RegexValidator ( ' ^[ \\ w.-]+$ ' , ' Enter a valid username. ' , ' invalid ' ) ] , verbose_name = ' username ' ) ,
) ,
migrations . AlterField (
model_name = ' account ' ,
name = ' language ' ,
field = models . CharField ( choices = [ ( ' EN ' , ' English ' ) ] , default = ' EN ' , max_length = 2 , verbose_name = ' language ' ) ,
) ,
migrations . AlterField (
model_name = ' account ' ,
name = ' type ' ,
field = models . CharField ( choices = [ ( ' INDIVIDUAL ' , ' Individual ' ) , ( ' ASSOCIATION ' , ' Association ' ) , ( ' CUSTOMER ' , ' Customer ' ) , ( ' COMPANY ' , ' Company ' ) , ( ' PUBLICBODY ' , ' Public body ' ) , ( ' STAFF ' , ' Staff ' ) , ( ' FRIEND ' , ' Friend ' ) ] , default = ' INDIVIDUAL ' , max_length = 32 , verbose_name = ' type ' ) ,
) ,
migrations . AlterField (
model_name = ' account ' ,
name = ' main_systemuser ' ,
field = models . ForeignKey ( editable = False , null = True , on_delete = django . db . models . deletion . SET_NULL , related_name = ' accounts_main ' , to = ' systemusers.SystemUser ' ) ,
) ,
2015-04-08 14:41:09 +00:00
]