2018-12-13 18:26:58 +00:00
# Generated by Django 2.1 on 2018-12-13 18:26
2018-08-31 12:46:35 +00:00
from django . conf import settings
2018-12-13 18:26:58 +00:00
import django . core . validators
2018-08-31 12:46:35 +00:00
from django . db import migrations , models
import django . db . models . deletion
import gestion . models
2018-12-13 18:26:58 +00:00
import simple_history . models
2018-08-31 12:46:35 +00:00
class Migration ( migrations . Migration ) :
initial = True
dependencies = [
( ' preferences ' , ' 0001_initial ' ) ,
2018-10-05 22:03:02 +00:00
migrations . swappable_dependency ( settings . AUTH_USER_MODEL ) ,
2018-08-31 12:46:35 +00:00
]
operations = [
2018-12-13 18:26:58 +00:00
migrations . CreateModel (
name = ' Consumption ' ,
fields = [
( ' id ' , models . AutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
( ' quantity ' , models . PositiveIntegerField ( default = 0 ) ) ,
( ' customer ' , models . ForeignKey ( on_delete = django . db . models . deletion . PROTECT , related_name = ' consumption_global_taken ' , to = settings . AUTH_USER_MODEL ) ) ,
] ,
options = {
' verbose_name ' : ' Consommation totale ' ,
} ,
) ,
2018-08-31 12:46:35 +00:00
migrations . CreateModel (
name = ' ConsumptionHistory ' ,
fields = [
( ' id ' , models . AutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
( ' quantity ' , models . PositiveIntegerField ( default = 0 ) ) ,
( ' date ' , models . DateTimeField ( auto_now_add = True ) ) ,
( ' amount ' , models . DecimalField ( decimal_places = 2 , default = 0 , max_digits = 7 ) ) ,
( ' coopeman ' , models . ForeignKey ( on_delete = django . db . models . deletion . PROTECT , related_name = ' consumption_selled ' , to = settings . AUTH_USER_MODEL ) ) ,
( ' customer ' , models . ForeignKey ( on_delete = django . db . models . deletion . PROTECT , related_name = ' consumption_taken ' , to = settings . AUTH_USER_MODEL ) ) ,
2018-12-13 18:26:58 +00:00
( ' paymentMethod ' , models . ForeignKey ( on_delete = django . db . models . deletion . PROTECT , to = ' preferences.PaymentMethod ' ) ) ,
] ,
options = {
' verbose_name ' : ' Consommation ' ,
} ,
) ,
migrations . CreateModel (
name = ' HistoricalConsumption ' ,
fields = [
( ' id ' , models . IntegerField ( auto_created = True , blank = True , db_index = True , verbose_name = ' ID ' ) ) ,
( ' quantity ' , models . PositiveIntegerField ( default = 0 ) ) ,
( ' history_id ' , models . AutoField ( primary_key = True , serialize = False ) ) ,
( ' history_change_reason ' , models . CharField ( max_length = 100 , null = True ) ) ,
( ' history_date ' , models . DateTimeField ( ) ) ,
( ' history_type ' , models . CharField ( choices = [ ( ' + ' , ' Created ' ) , ( ' ~ ' , ' Changed ' ) , ( ' - ' , ' Deleted ' ) ] , max_length = 1 ) ) ,
( ' customer ' , models . ForeignKey ( blank = True , db_constraint = False , null = True , on_delete = django . db . models . deletion . DO_NOTHING , related_name = ' + ' , to = settings . AUTH_USER_MODEL ) ) ,
( ' history_user ' , models . ForeignKey ( null = True , on_delete = django . db . models . deletion . SET_NULL , related_name = ' + ' , to = settings . AUTH_USER_MODEL ) ) ,
] ,
options = {
' verbose_name ' : ' historical Consommation totale ' ,
' ordering ' : ( ' -history_date ' , ' -history_id ' ) ,
' get_latest_by ' : ' history_date ' ,
} ,
bases = ( simple_history . models . HistoricalChanges , models . Model ) ,
) ,
migrations . CreateModel (
name = ' HistoricalConsumptionHistory ' ,
fields = [
( ' id ' , models . IntegerField ( auto_created = True , blank = True , db_index = True , verbose_name = ' ID ' ) ) ,
( ' quantity ' , models . PositiveIntegerField ( default = 0 ) ) ,
( ' date ' , models . DateTimeField ( blank = True , editable = False ) ) ,
( ' amount ' , models . DecimalField ( decimal_places = 2 , default = 0 , max_digits = 7 ) ) ,
( ' history_id ' , models . AutoField ( primary_key = True , serialize = False ) ) ,
( ' history_change_reason ' , models . CharField ( max_length = 100 , null = True ) ) ,
( ' history_date ' , models . DateTimeField ( ) ) ,
( ' history_type ' , models . CharField ( choices = [ ( ' + ' , ' Created ' ) , ( ' ~ ' , ' Changed ' ) , ( ' - ' , ' Deleted ' ) ] , max_length = 1 ) ) ,
( ' coopeman ' , models . ForeignKey ( blank = True , db_constraint = False , null = True , on_delete = django . db . models . deletion . DO_NOTHING , related_name = ' + ' , to = settings . AUTH_USER_MODEL ) ) ,
( ' customer ' , models . ForeignKey ( blank = True , db_constraint = False , null = True , on_delete = django . db . models . deletion . DO_NOTHING , related_name = ' + ' , to = settings . AUTH_USER_MODEL ) ) ,
( ' history_user ' , models . ForeignKey ( null = True , on_delete = django . db . models . deletion . SET_NULL , related_name = ' + ' , to = settings . AUTH_USER_MODEL ) ) ,
( ' paymentMethod ' , models . ForeignKey ( blank = True , db_constraint = False , null = True , on_delete = django . db . models . deletion . DO_NOTHING , related_name = ' + ' , to = ' preferences.PaymentMethod ' ) ) ,
] ,
options = {
' verbose_name ' : ' historical Consommation ' ,
' ordering ' : ( ' -history_date ' , ' -history_id ' ) ,
' get_latest_by ' : ' history_date ' ,
} ,
bases = ( simple_history . models . HistoricalChanges , models . Model ) ,
) ,
migrations . CreateModel (
name = ' HistoricalKeg ' ,
fields = [
( ' id ' , models . IntegerField ( auto_created = True , blank = True , db_index = True , verbose_name = ' ID ' ) ) ,
( ' name ' , models . CharField ( db_index = True , max_length = 20 , verbose_name = ' Nom ' ) ) ,
( ' stockHold ' , models . IntegerField ( default = 0 , verbose_name = ' Stock en soute ' ) ) ,
( ' barcode ' , models . CharField ( db_index = True , max_length = 20 , verbose_name = ' Code barre ' ) ) ,
( ' amount ' , models . DecimalField ( decimal_places = 2 , max_digits = 7 , validators = [ django . core . validators . MinValueValidator ( 0 ) ] , verbose_name = ' Prix du fût ' ) ) ,
( ' capacity ' , models . IntegerField ( default = 30 , verbose_name = ' Capacité (L) ' ) ) ,
( ' is_active ' , models . BooleanField ( default = False , verbose_name = ' Actif ' ) ) ,
( ' history_id ' , models . AutoField ( primary_key = True , serialize = False ) ) ,
( ' history_change_reason ' , models . CharField ( max_length = 100 , null = True ) ) ,
( ' history_date ' , models . DateTimeField ( ) ) ,
( ' history_type ' , models . CharField ( choices = [ ( ' + ' , ' Created ' ) , ( ' ~ ' , ' Changed ' ) , ( ' - ' , ' Deleted ' ) ] , max_length = 1 ) ) ,
] ,
options = {
' verbose_name ' : ' historical Fût ' ,
' ordering ' : ( ' -history_date ' , ' -history_id ' ) ,
' get_latest_by ' : ' history_date ' ,
} ,
bases = ( simple_history . models . HistoricalChanges , models . Model ) ,
) ,
migrations . CreateModel (
name = ' HistoricalKegHistory ' ,
fields = [
( ' id ' , models . IntegerField ( auto_created = True , blank = True , db_index = True , verbose_name = ' ID ' ) ) ,
( ' openingDate ' , models . DateTimeField ( blank = True , editable = False ) ) ,
( ' quantitySold ' , models . DecimalField ( decimal_places = 2 , default = 0 , max_digits = 5 ) ) ,
( ' amountSold ' , models . DecimalField ( decimal_places = 2 , default = 0 , max_digits = 5 ) ) ,
( ' closingDate ' , models . DateTimeField ( blank = True , null = True ) ) ,
( ' isCurrentKegHistory ' , models . BooleanField ( default = True ) ) ,
( ' history_id ' , models . AutoField ( primary_key = True , serialize = False ) ) ,
( ' history_change_reason ' , models . CharField ( max_length = 100 , null = True ) ) ,
( ' history_date ' , models . DateTimeField ( ) ) ,
( ' history_type ' , models . CharField ( choices = [ ( ' + ' , ' Created ' ) , ( ' ~ ' , ' Changed ' ) , ( ' - ' , ' Deleted ' ) ] , max_length = 1 ) ) ,
( ' history_user ' , models . ForeignKey ( null = True , on_delete = django . db . models . deletion . SET_NULL , related_name = ' + ' , to = settings . AUTH_USER_MODEL ) ) ,
] ,
options = {
' verbose_name ' : ' historical Historique de fût ' ,
' ordering ' : ( ' -history_date ' , ' -history_id ' ) ,
' get_latest_by ' : ' history_date ' ,
} ,
bases = ( simple_history . models . HistoricalChanges , models . Model ) ,
) ,
migrations . CreateModel (
name = ' HistoricalMenu ' ,
fields = [
( ' id ' , models . IntegerField ( auto_created = True , blank = True , db_index = True , verbose_name = ' ID ' ) ) ,
( ' name ' , models . CharField ( max_length = 255 , verbose_name = ' Nom ' ) ) ,
( ' amount ' , models . DecimalField ( decimal_places = 2 , max_digits = 7 , validators = [ django . core . validators . MinValueValidator ( 0 ) ] , verbose_name = ' Montant ' ) ) ,
( ' barcode ' , models . CharField ( db_index = True , max_length = 20 , verbose_name = ' Code barre ' ) ) ,
( ' is_active ' , models . BooleanField ( default = False , verbose_name = ' Actif ' ) ) ,
( ' history_id ' , models . AutoField ( primary_key = True , serialize = False ) ) ,
( ' history_change_reason ' , models . CharField ( max_length = 100 , null = True ) ) ,
( ' history_date ' , models . DateTimeField ( ) ) ,
( ' history_type ' , models . CharField ( choices = [ ( ' + ' , ' Created ' ) , ( ' ~ ' , ' Changed ' ) , ( ' - ' , ' Deleted ' ) ] , max_length = 1 ) ) ,
( ' history_user ' , models . ForeignKey ( null = True , on_delete = django . db . models . deletion . SET_NULL , related_name = ' + ' , to = settings . AUTH_USER_MODEL ) ) ,
] ,
options = {
' verbose_name ' : ' historical menu ' ,
' ordering ' : ( ' -history_date ' , ' -history_id ' ) ,
' get_latest_by ' : ' history_date ' ,
} ,
bases = ( simple_history . models . HistoricalChanges , models . Model ) ,
) ,
migrations . CreateModel (
name = ' HistoricalMenuHistory ' ,
fields = [
( ' id ' , models . IntegerField ( auto_created = True , blank = True , db_index = True , verbose_name = ' ID ' ) ) ,
( ' quantity ' , models . PositiveIntegerField ( default = 0 ) ) ,
( ' date ' , models . DateTimeField ( blank = True , editable = False ) ) ,
( ' amount ' , models . DecimalField ( decimal_places = 2 , default = 0 , max_digits = 7 ) ) ,
( ' history_id ' , models . AutoField ( primary_key = True , serialize = False ) ) ,
( ' history_change_reason ' , models . CharField ( max_length = 100 , null = True ) ) ,
( ' history_date ' , models . DateTimeField ( ) ) ,
( ' history_type ' , models . CharField ( choices = [ ( ' + ' , ' Created ' ) , ( ' ~ ' , ' Changed ' ) , ( ' - ' , ' Deleted ' ) ] , max_length = 1 ) ) ,
( ' coopeman ' , models . ForeignKey ( blank = True , db_constraint = False , null = True , on_delete = django . db . models . deletion . DO_NOTHING , related_name = ' + ' , to = settings . AUTH_USER_MODEL ) ) ,
( ' customer ' , models . ForeignKey ( blank = True , db_constraint = False , null = True , on_delete = django . db . models . deletion . DO_NOTHING , related_name = ' + ' , to = settings . AUTH_USER_MODEL ) ) ,
( ' history_user ' , models . ForeignKey ( null = True , on_delete = django . db . models . deletion . SET_NULL , related_name = ' + ' , to = settings . AUTH_USER_MODEL ) ) ,
] ,
options = {
' verbose_name ' : ' historical Historique de menu ' ,
' ordering ' : ( ' -history_date ' , ' -history_id ' ) ,
' get_latest_by ' : ' history_date ' ,
} ,
bases = ( simple_history . models . HistoricalChanges , models . Model ) ,
) ,
migrations . CreateModel (
name = ' HistoricalProduct ' ,
fields = [
( ' id ' , models . IntegerField ( auto_created = True , blank = True , db_index = True , verbose_name = ' ID ' ) ) ,
( ' name ' , models . CharField ( db_index = True , max_length = 40 , verbose_name = ' Nom ' ) ) ,
( ' amount ' , models . DecimalField ( decimal_places = 2 , max_digits = 5 , validators = [ django . core . validators . MinValueValidator ( 0 ) ] , verbose_name = ' Prix de vente ' ) ) ,
( ' stockHold ' , models . IntegerField ( default = 0 , verbose_name = ' Stock en soute ' ) ) ,
( ' stockBar ' , models . IntegerField ( default = 0 , verbose_name = ' Stock en bar ' ) ) ,
( ' barcode ' , models . CharField ( db_index = True , max_length = 20 , verbose_name = ' Code barre ' ) ) ,
( ' category ' , models . CharField ( choices = [ ( ' PP ' , ' Pinte Pression ' ) , ( ' DP ' , ' Demi Pression ' ) , ( ' GP ' , ' Galopin pression ' ) , ( ' BT ' , ' Bouteille ' ) , ( ' SO ' , ' Soft ' ) , ( ' FO ' , ' Bouffe autre que panini ' ) , ( ' PA ' , ' Bouffe pour panini ' ) ] , default = ' FO ' , max_length = 2 , verbose_name = ' Catégorie ' ) ) ,
( ' needQuantityButton ' , models . BooleanField ( default = False , verbose_name = ' Bouton quantité ' ) ) ,
( ' is_active ' , models . BooleanField ( default = True , verbose_name = ' Actif ' ) ) ,
( ' volume ' , models . PositiveIntegerField ( default = 0 ) ) ,
( ' deg ' , models . DecimalField ( decimal_places = 2 , default = 0 , max_digits = 5 , validators = [ django . core . validators . MinValueValidator ( 0 ) ] , verbose_name = ' Degré ' ) ) ,
( ' adherentRequired ' , models . BooleanField ( default = True , verbose_name = ' Adhérent requis ' ) ) ,
( ' history_id ' , models . AutoField ( primary_key = True , serialize = False ) ) ,
( ' history_change_reason ' , models . CharField ( max_length = 100 , null = True ) ) ,
( ' history_date ' , models . DateTimeField ( ) ) ,
( ' history_type ' , models . CharField ( choices = [ ( ' + ' , ' Created ' ) , ( ' ~ ' , ' Changed ' ) , ( ' - ' , ' Deleted ' ) ] , max_length = 1 ) ) ,
( ' history_user ' , models . ForeignKey ( null = True , on_delete = django . db . models . deletion . SET_NULL , related_name = ' + ' , to = settings . AUTH_USER_MODEL ) ) ,
2018-08-31 12:46:35 +00:00
] ,
2018-12-13 18:26:58 +00:00
options = {
' verbose_name ' : ' historical Produit ' ,
' ordering ' : ( ' -history_date ' , ' -history_id ' ) ,
' get_latest_by ' : ' history_date ' ,
} ,
bases = ( simple_history . models . HistoricalChanges , models . Model ) ,
) ,
migrations . CreateModel (
name = ' HistoricalRefund ' ,
fields = [
( ' id ' , models . IntegerField ( auto_created = True , blank = True , db_index = True , verbose_name = ' ID ' ) ) ,
( ' date ' , models . DateTimeField ( blank = True , editable = False ) ) ,
( ' amount ' , models . DecimalField ( decimal_places = 2 , max_digits = 7 , validators = [ django . core . validators . MinValueValidator ( 0 ) ] , verbose_name = ' Montant ' ) ) ,
( ' history_id ' , models . AutoField ( primary_key = True , serialize = False ) ) ,
( ' history_change_reason ' , models . CharField ( max_length = 100 , null = True ) ) ,
( ' history_date ' , models . DateTimeField ( ) ) ,
( ' history_type ' , models . CharField ( choices = [ ( ' + ' , ' Created ' ) , ( ' ~ ' , ' Changed ' ) , ( ' - ' , ' Deleted ' ) ] , max_length = 1 ) ) ,
( ' coopeman ' , models . ForeignKey ( blank = True , db_constraint = False , null = True , on_delete = django . db . models . deletion . DO_NOTHING , related_name = ' + ' , to = settings . AUTH_USER_MODEL ) ) ,
( ' customer ' , models . ForeignKey ( blank = True , db_constraint = False , null = True , on_delete = django . db . models . deletion . DO_NOTHING , related_name = ' + ' , to = settings . AUTH_USER_MODEL ) ) ,
( ' history_user ' , models . ForeignKey ( null = True , on_delete = django . db . models . deletion . SET_NULL , related_name = ' + ' , to = settings . AUTH_USER_MODEL ) ) ,
] ,
options = {
' verbose_name ' : ' historical Remboursement ' ,
' ordering ' : ( ' -history_date ' , ' -history_id ' ) ,
' get_latest_by ' : ' history_date ' ,
} ,
bases = ( simple_history . models . HistoricalChanges , models . Model ) ,
) ,
migrations . CreateModel (
name = ' HistoricalReload ' ,
fields = [
( ' id ' , models . IntegerField ( auto_created = True , blank = True , db_index = True , verbose_name = ' ID ' ) ) ,
( ' amount ' , models . DecimalField ( decimal_places = 2 , max_digits = 7 , validators = [ django . core . validators . MinValueValidator ( 0 ) ] , verbose_name = ' Montant ' ) ) ,
( ' date ' , models . DateTimeField ( blank = True , editable = False ) ) ,
( ' history_id ' , models . AutoField ( primary_key = True , serialize = False ) ) ,
( ' history_change_reason ' , models . CharField ( max_length = 100 , null = True ) ) ,
( ' history_date ' , models . DateTimeField ( ) ) ,
( ' history_type ' , models . CharField ( choices = [ ( ' + ' , ' Created ' ) , ( ' ~ ' , ' Changed ' ) , ( ' - ' , ' Deleted ' ) ] , max_length = 1 ) ) ,
( ' PaymentMethod ' , models . ForeignKey ( blank = True , db_constraint = False , null = True , on_delete = django . db . models . deletion . DO_NOTHING , related_name = ' + ' , to = ' preferences.PaymentMethod ' ) ) ,
( ' coopeman ' , models . ForeignKey ( blank = True , db_constraint = False , null = True , on_delete = django . db . models . deletion . DO_NOTHING , related_name = ' + ' , to = settings . AUTH_USER_MODEL ) ) ,
( ' customer ' , models . ForeignKey ( blank = True , db_constraint = False , null = True , on_delete = django . db . models . deletion . DO_NOTHING , related_name = ' + ' , to = settings . AUTH_USER_MODEL ) ) ,
( ' history_user ' , models . ForeignKey ( null = True , on_delete = django . db . models . deletion . SET_NULL , related_name = ' + ' , to = settings . AUTH_USER_MODEL ) ) ,
] ,
options = {
' verbose_name ' : ' historical Rechargement ' ,
' ordering ' : ( ' -history_date ' , ' -history_id ' ) ,
' get_latest_by ' : ' history_date ' ,
} ,
bases = ( simple_history . models . HistoricalChanges , models . Model ) ,
2018-08-31 12:46:35 +00:00
) ,
2018-10-05 22:03:02 +00:00
migrations . CreateModel (
name = ' Keg ' ,
fields = [
( ' id ' , models . AutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
( ' name ' , models . CharField ( max_length = 20 , unique = True , verbose_name = ' Nom ' ) ) ,
( ' stockHold ' , models . IntegerField ( default = 0 , verbose_name = ' Stock en soute ' ) ) ,
( ' barcode ' , models . CharField ( max_length = 20 , unique = True , verbose_name = ' Code barre ' ) ) ,
2018-12-13 18:26:58 +00:00
( ' amount ' , models . DecimalField ( decimal_places = 2 , max_digits = 7 , validators = [ django . core . validators . MinValueValidator ( 0 ) ] , verbose_name = ' Prix du fût ' ) ) ,
2018-10-05 22:03:02 +00:00
( ' capacity ' , models . IntegerField ( default = 30 , verbose_name = ' Capacité (L) ' ) ) ,
( ' is_active ' , models . BooleanField ( default = False , verbose_name = ' Actif ' ) ) ,
] ,
2018-12-13 18:26:58 +00:00
options = {
' verbose_name ' : ' Fût ' ,
' permissions ' : ( ( ' open_keg ' , ' Peut percuter les fûts ' ) , ( ' close_keg ' , ' Peut fermer les fûts ' ) ) ,
} ,
2018-10-05 22:03:02 +00:00
) ,
migrations . CreateModel (
name = ' KegHistory ' ,
fields = [
( ' id ' , models . AutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
( ' openingDate ' , models . DateTimeField ( auto_now_add = True ) ) ,
2018-12-13 18:26:58 +00:00
( ' quantitySold ' , models . DecimalField ( decimal_places = 2 , default = 0 , max_digits = 5 ) ) ,
( ' amountSold ' , models . DecimalField ( decimal_places = 2 , default = 0 , max_digits = 5 ) ) ,
( ' closingDate ' , models . DateTimeField ( blank = True , null = True ) ) ,
2018-10-05 22:03:02 +00:00
( ' isCurrentKegHistory ' , models . BooleanField ( default = True ) ) ,
2018-12-13 18:26:58 +00:00
( ' keg ' , models . ForeignKey ( on_delete = django . db . models . deletion . PROTECT , to = ' gestion.Keg ' ) ) ,
2018-10-05 22:03:02 +00:00
] ,
2018-12-13 18:26:58 +00:00
options = {
' verbose_name ' : ' Historique de fût ' ,
} ,
2018-10-05 22:03:02 +00:00
) ,
2018-08-31 12:46:35 +00:00
migrations . CreateModel (
name = ' Menu ' ,
fields = [
( ' id ' , models . AutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
2018-10-05 22:03:02 +00:00
( ' name ' , models . CharField ( max_length = 255 , verbose_name = ' Nom ' ) ) ,
2018-12-13 18:26:58 +00:00
( ' amount ' , models . DecimalField ( decimal_places = 2 , max_digits = 7 , validators = [ django . core . validators . MinValueValidator ( 0 ) ] , verbose_name = ' Montant ' ) ) ,
2018-10-05 22:03:02 +00:00
( ' barcode ' , models . CharField ( max_length = 20 , unique = True , verbose_name = ' Code barre ' ) ) ,
( ' is_active ' , models . BooleanField ( default = False , verbose_name = ' Actif ' ) ) ,
2018-08-31 12:46:35 +00:00
] ,
) ,
migrations . CreateModel (
name = ' MenuHistory ' ,
fields = [
( ' id ' , models . AutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
( ' quantity ' , models . PositiveIntegerField ( default = 0 ) ) ,
( ' date ' , models . DateTimeField ( auto_now_add = True ) ) ,
2018-12-13 18:26:58 +00:00
( ' amount ' , models . DecimalField ( decimal_places = 2 , default = 0 , max_digits = 7 ) ) ,
2018-08-31 12:46:35 +00:00
( ' coopeman ' , models . ForeignKey ( on_delete = django . db . models . deletion . PROTECT , related_name = ' menu_selled ' , to = settings . AUTH_USER_MODEL ) ) ,
( ' customer ' , models . ForeignKey ( on_delete = django . db . models . deletion . PROTECT , related_name = ' menu_taken ' , to = settings . AUTH_USER_MODEL ) ) ,
( ' menu ' , models . ForeignKey ( on_delete = django . db . models . deletion . PROTECT , to = ' gestion.Menu ' ) ) ,
2018-12-13 18:26:58 +00:00
( ' paymentMethod ' , models . ForeignKey ( on_delete = django . db . models . deletion . PROTECT , to = ' preferences.PaymentMethod ' ) ) ,
2018-08-31 12:46:35 +00:00
] ,
2018-12-13 18:26:58 +00:00
options = {
' verbose_name ' : ' Historique de menu ' ,
} ,
2018-08-31 12:46:35 +00:00
) ,
migrations . CreateModel (
name = ' Product ' ,
fields = [
( ' id ' , models . AutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
2018-10-05 22:03:02 +00:00
( ' name ' , models . CharField ( max_length = 40 , unique = True , verbose_name = ' Nom ' ) ) ,
2018-12-13 18:26:58 +00:00
( ' amount ' , models . DecimalField ( decimal_places = 2 , max_digits = 5 , validators = [ django . core . validators . MinValueValidator ( 0 ) ] , verbose_name = ' Prix de vente ' ) ) ,
2018-10-05 22:03:02 +00:00
( ' stockHold ' , models . IntegerField ( default = 0 , verbose_name = ' Stock en soute ' ) ) ,
( ' stockBar ' , models . IntegerField ( default = 0 , verbose_name = ' Stock en bar ' ) ) ,
( ' barcode ' , models . CharField ( max_length = 20 , unique = True , verbose_name = ' Code barre ' ) ) ,
( ' category ' , models . CharField ( choices = [ ( ' PP ' , ' Pinte Pression ' ) , ( ' DP ' , ' Demi Pression ' ) , ( ' GP ' , ' Galopin pression ' ) , ( ' BT ' , ' Bouteille ' ) , ( ' SO ' , ' Soft ' ) , ( ' FO ' , ' Bouffe autre que panini ' ) , ( ' PA ' , ' Bouffe pour panini ' ) ] , default = ' FO ' , max_length = 2 , verbose_name = ' Catégorie ' ) ) ,
( ' needQuantityButton ' , models . BooleanField ( default = False , verbose_name = ' Bouton quantité ' ) ) ,
( ' is_active ' , models . BooleanField ( default = True , verbose_name = ' Actif ' ) ) ,
2018-12-13 18:26:58 +00:00
( ' volume ' , models . PositiveIntegerField ( default = 0 ) ) ,
( ' deg ' , models . DecimalField ( decimal_places = 2 , default = 0 , max_digits = 5 , validators = [ django . core . validators . MinValueValidator ( 0 ) ] , verbose_name = ' Degré ' ) ) ,
( ' adherentRequired ' , models . BooleanField ( default = True , verbose_name = ' Adhérent requis ' ) ) ,
2018-08-31 12:46:35 +00:00
] ,
2018-12-13 18:26:58 +00:00
options = {
' verbose_name ' : ' Produit ' ,
} ,
2018-08-31 12:46:35 +00:00
) ,
migrations . CreateModel (
name = ' Refund ' ,
fields = [
( ' id ' , models . AutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
( ' date ' , models . DateTimeField ( auto_now_add = True ) ) ,
2018-12-13 18:26:58 +00:00
( ' amount ' , models . DecimalField ( decimal_places = 2 , max_digits = 7 , validators = [ django . core . validators . MinValueValidator ( 0 ) ] , verbose_name = ' Montant ' ) ) ,
2018-08-31 12:46:35 +00:00
( ' coopeman ' , models . ForeignKey ( on_delete = django . db . models . deletion . PROTECT , related_name = ' refund_realized ' , to = settings . AUTH_USER_MODEL ) ) ,
2018-10-05 22:03:02 +00:00
( ' customer ' , models . ForeignKey ( on_delete = django . db . models . deletion . PROTECT , related_name = ' refund_taken ' , to = settings . AUTH_USER_MODEL , verbose_name = ' Client ' ) ) ,
2018-08-31 12:46:35 +00:00
] ,
2018-12-13 18:26:58 +00:00
options = {
' verbose_name ' : ' Remboursement ' ,
} ,
2018-08-31 12:46:35 +00:00
) ,
migrations . CreateModel (
name = ' Reload ' ,
fields = [
( ' id ' , models . AutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
2018-12-13 18:26:58 +00:00
( ' amount ' , models . DecimalField ( decimal_places = 2 , max_digits = 7 , validators = [ django . core . validators . MinValueValidator ( 0 ) ] , verbose_name = ' Montant ' ) ) ,
2018-08-31 12:46:35 +00:00
( ' date ' , models . DateTimeField ( auto_now_add = True ) ) ,
2018-10-05 22:03:02 +00:00
( ' PaymentMethod ' , models . ForeignKey ( on_delete = django . db . models . deletion . PROTECT , to = ' preferences.PaymentMethod ' , verbose_name = ' Moyen de paiement ' ) ) ,
2018-08-31 12:46:35 +00:00
( ' coopeman ' , models . ForeignKey ( on_delete = django . db . models . deletion . PROTECT , related_name = ' reload_realized ' , to = settings . AUTH_USER_MODEL ) ) ,
2018-10-05 22:03:02 +00:00
( ' customer ' , models . ForeignKey ( on_delete = django . db . models . deletion . PROTECT , related_name = ' reload_taken ' , to = settings . AUTH_USER_MODEL , verbose_name = ' Client ' ) ) ,
2018-08-31 12:46:35 +00:00
] ,
2018-12-13 18:26:58 +00:00
options = {
' verbose_name ' : ' Rechargement ' ,
} ,
2018-08-31 12:46:35 +00:00
) ,
migrations . AddField (
model_name = ' menu ' ,
name = ' articles ' ,
2018-10-05 22:03:02 +00:00
field = models . ManyToManyField ( to = ' gestion.Product ' , verbose_name = ' Produits ' ) ,
) ,
migrations . AddField (
model_name = ' keg ' ,
name = ' demi ' ,
field = models . ForeignKey ( on_delete = django . db . models . deletion . PROTECT , related_name = ' futd ' , to = ' gestion.Product ' , validators = [ gestion . models . isDemi ] ) ,
) ,
migrations . AddField (
model_name = ' keg ' ,
name = ' galopin ' ,
field = models . ForeignKey ( blank = True , null = True , on_delete = django . db . models . deletion . PROTECT , related_name = ' futg ' , to = ' gestion.Product ' , validators = [ gestion . models . isGalopin ] ) ,
) ,
migrations . AddField (
model_name = ' keg ' ,
name = ' pinte ' ,
field = models . ForeignKey ( on_delete = django . db . models . deletion . PROTECT , related_name = ' futp ' , to = ' gestion.Product ' , validators = [ gestion . models . isPinte ] ) ,
2018-08-31 12:46:35 +00:00
) ,
migrations . AddField (
2018-12-13 18:26:58 +00:00
model_name = ' historicalmenuhistory ' ,
2018-08-31 12:46:35 +00:00
name = ' menu ' ,
2018-12-13 18:26:58 +00:00
field = models . ForeignKey ( blank = True , db_constraint = False , null = True , on_delete = django . db . models . deletion . DO_NOTHING , related_name = ' + ' , to = ' gestion.Menu ' ) ,
2018-08-31 12:46:35 +00:00
) ,
migrations . AddField (
2018-12-13 18:26:58 +00:00
model_name = ' historicalmenuhistory ' ,
2018-08-31 12:46:35 +00:00
name = ' paymentMethod ' ,
2018-12-13 18:26:58 +00:00
field = models . ForeignKey ( blank = True , db_constraint = False , null = True , on_delete = django . db . models . deletion . DO_NOTHING , related_name = ' + ' , to = ' preferences.PaymentMethod ' ) ,
) ,
migrations . AddField (
model_name = ' historicalkeghistory ' ,
name = ' keg ' ,
field = models . ForeignKey ( blank = True , db_constraint = False , null = True , on_delete = django . db . models . deletion . DO_NOTHING , related_name = ' + ' , to = ' gestion.Keg ' ) ,
) ,
migrations . AddField (
model_name = ' historicalkeg ' ,
name = ' demi ' ,
field = models . ForeignKey ( blank = True , db_constraint = False , null = True , on_delete = django . db . models . deletion . DO_NOTHING , related_name = ' + ' , to = ' gestion.Product ' ) ,
) ,
migrations . AddField (
model_name = ' historicalkeg ' ,
name = ' galopin ' ,
field = models . ForeignKey ( blank = True , db_constraint = False , null = True , on_delete = django . db . models . deletion . DO_NOTHING , related_name = ' + ' , to = ' gestion.Product ' ) ,
) ,
migrations . AddField (
model_name = ' historicalkeg ' ,
name = ' history_user ' ,
field = models . ForeignKey ( null = True , on_delete = django . db . models . deletion . SET_NULL , related_name = ' + ' , to = settings . AUTH_USER_MODEL ) ,
) ,
migrations . AddField (
model_name = ' historicalkeg ' ,
name = ' pinte ' ,
field = models . ForeignKey ( blank = True , db_constraint = False , null = True , on_delete = django . db . models . deletion . DO_NOTHING , related_name = ' + ' , to = ' gestion.Product ' ) ,
) ,
migrations . AddField (
model_name = ' historicalconsumptionhistory ' ,
name = ' product ' ,
field = models . ForeignKey ( blank = True , db_constraint = False , null = True , on_delete = django . db . models . deletion . DO_NOTHING , related_name = ' + ' , to = ' gestion.Product ' ) ,
) ,
migrations . AddField (
model_name = ' historicalconsumption ' ,
name = ' product ' ,
field = models . ForeignKey ( blank = True , db_constraint = False , null = True , on_delete = django . db . models . deletion . DO_NOTHING , related_name = ' + ' , to = ' gestion.Product ' ) ,
2018-08-31 12:46:35 +00:00
) ,
migrations . AddField (
model_name = ' consumptionhistory ' ,
name = ' product ' ,
field = models . ForeignKey ( on_delete = django . db . models . deletion . PROTECT , to = ' gestion.Product ' ) ,
) ,
2018-12-13 18:26:58 +00:00
migrations . AddField (
model_name = ' consumption ' ,
name = ' product ' ,
field = models . ForeignKey ( on_delete = django . db . models . deletion . PROTECT , to = ' gestion.Product ' ) ,
) ,
2018-08-31 12:46:35 +00:00
]