2022-08-18 12:27:02 +00:00
# Generated by Django 2.2.27 on 2022-08-18 11:01
2022-08-18 10:33:10 +00:00
from django . db import migrations , models
import django . db . models . deletion
import django . utils . timezone
class Migration ( migrations . Migration ) :
initial = True
dependencies = [
2022-08-18 12:27:02 +00:00
( ' member ' , ' 0009_auto_20220818_1301 ' ) ,
2022-08-18 10:33:10 +00:00
( ' note ' , ' 0006_trust ' ) ,
]
operations = [
migrations . CreateModel (
name = ' Food ' ,
fields = [
( ' id ' , models . AutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
( ' name ' , models . CharField ( max_length = 255 , verbose_name = ' food ' ) ) ,
( ' price ' , models . IntegerField ( verbose_name = ' price ' ) ) ,
( ' available ' , models . BooleanField ( default = True , help_text = " If set to false, this option won ' t be offered (in case of out of stock) " , verbose_name = ' available ' ) ) ,
( ' club ' , models . ForeignKey ( on_delete = django . db . models . deletion . PROTECT , to = ' member.Club ' , verbose_name = ' destination club ' ) ) ,
] ,
options = {
' verbose_name ' : ' food ' ,
' verbose_name_plural ' : ' food ' ,
} ,
) ,
migrations . CreateModel (
name = ' FoodOption ' ,
fields = [
( ' id ' , models . AutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
( ' name ' , models . CharField ( max_length = 255 , verbose_name = ' name ' ) ) ,
( ' extra_cost ' , models . IntegerField ( default = 0 , verbose_name = ' extra cost ' ) ) ,
( ' available ' , models . BooleanField ( default = True , help_text = " If set to false, this option won ' t be offered (in case of out of stock) " , verbose_name = ' available ' ) ) ,
( ' food ' , models . ForeignKey ( on_delete = django . db . models . deletion . CASCADE , to = ' sheets.Food ' , verbose_name = ' food ' ) ) ,
] ,
options = {
' verbose_name ' : ' food option ' ,
' verbose_name_plural ' : ' food options ' ,
} ,
) ,
migrations . CreateModel (
name = ' Meal ' ,
fields = [
( ' id ' , models . AutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
( ' name ' , models . CharField ( max_length = 255 , verbose_name = ' name ' ) ) ,
( ' price ' , models . IntegerField ( verbose_name = ' price ' ) ) ,
( ' available ' , models . BooleanField ( default = True , help_text = " If set to false, this option won ' t be offered (in case of out of stock) " , verbose_name = ' available ' ) ) ,
( ' content ' , models . ManyToManyField ( to = ' sheets.Food ' , verbose_name = ' content ' ) ) ,
] ,
options = {
' verbose_name ' : ' meal ' ,
' verbose_name_plural ' : ' meals ' ,
} ,
) ,
migrations . CreateModel (
name = ' Order ' ,
fields = [
( ' id ' , models . AutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
( ' date ' , models . DateTimeField ( auto_now_add = True , verbose_name = ' date ' ) ) ,
( ' gift ' , models . IntegerField ( verbose_name = ' gift ' ) ) ,
( ' note ' , models . ForeignKey ( on_delete = django . db . models . deletion . PROTECT , to = ' note.Note ' , verbose_name = ' note ' ) ) ,
] ,
options = {
' verbose_name ' : ' order ' ,
' verbose_name_plural ' : ' orders ' ,
} ,
) ,
migrations . CreateModel (
name = ' OrderedFood ' ,
fields = [
( ' id ' , models . AutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
( ' remark ' , models . TextField ( blank = True , default = ' ' , verbose_name = ' remark ' ) ) ,
( ' priority ' , models . CharField ( blank = True , default = ' ' , max_length = 64 , verbose_name = ' priority request ' ) ) ,
( ' number ' , models . IntegerField ( help_text = ' How many times the user ordered this. ' , verbose_name = ' number ' ) ) ,
( ' status ' , models . CharField ( choices = [ ( ' QUEUED ' , ' queued ' ) , ( ' READY ' , ' ready ' ) , ( ' SERVED ' , ' served ' ) , ( ' CANCELED ' , ' canceled ' ) ] , max_length = 8 , verbose_name = ' status ' ) ) ,
( ' served_date ' , models . DateTimeField ( default = None , null = True , verbose_name = ' served date ' ) ) ,
( ' food ' , models . ForeignKey ( on_delete = django . db . models . deletion . PROTECT , to = ' sheets.Food ' , verbose_name = ' food ' ) ) ,
] ,
options = {
' verbose_name ' : ' ordered food ' ,
' verbose_name_plural ' : ' ordered food ' ,
} ,
) ,
migrations . CreateModel (
name = ' Sheet ' ,
fields = [
( ' id ' , models . AutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
( ' name ' , models . CharField ( max_length = 255 , verbose_name = ' name ' ) ) ,
( ' date ' , models . DateTimeField ( default = django . utils . timezone . now , verbose_name = ' start date ' ) ) ,
( ' description ' , models . TextField ( verbose_name = ' description ' ) ) ,
2022-08-18 12:27:02 +00:00
( ' visible ' , models . BooleanField ( default = False , help_text = ' the note sheet will be private until this field is checked. ' , verbose_name = ' visible ' ) ) ,
2022-08-18 10:33:10 +00:00
] ,
options = {
' verbose_name ' : ' note sheet ' ,
' verbose_name_plural ' : ' note sheets ' ,
} ,
) ,
migrations . CreateModel (
name = ' SheetOrderTransaction ' ,
fields = [
( ' transaction_ptr ' , models . OneToOneField ( auto_created = True , on_delete = django . db . models . deletion . CASCADE , parent_link = True , primary_key = True , serialize = False , to = ' note.Transaction ' ) ) ,
( ' ordered_food ' , models . ForeignKey ( on_delete = django . db . models . deletion . PROTECT , to = ' sheets.OrderedFood ' , verbose_name = ' ordered food ' ) ) ,
] ,
options = {
' verbose_name ' : ' sheet order transaction ' ,
' verbose_name_plural ' : ' sheet order transactions ' ,
} ,
bases = ( ' note.transaction ' , ) ,
) ,
migrations . CreateModel (
name = ' OrderedMeal ' ,
fields = [
( ' id ' , models . AutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
( ' meal ' , models . ForeignKey ( on_delete = django . db . models . deletion . PROTECT , to = ' sheets.Meal ' , verbose_name = ' meal ' ) ) ,
( ' order ' , models . ForeignKey ( on_delete = django . db . models . deletion . PROTECT , to = ' sheets.Order ' , verbose_name = ' order ' ) ) ,
] ,
options = {
' verbose_name ' : ' ordered meal ' ,
' verbose_name_plural ' : ' ordered meals ' ,
} ,
) ,
migrations . AddField (
model_name = ' orderedfood ' ,
name = ' meal ' ,
field = models . ForeignKey ( default = None , null = True , on_delete = django . db . models . deletion . SET_NULL , to = ' sheets.OrderedMeal ' , verbose_name = ' ordered meal ' ) ,
) ,
migrations . AddField (
model_name = ' orderedfood ' ,
name = ' options ' ,
field = models . ManyToManyField ( blank = True , to = ' sheets.FoodOption ' , verbose_name = ' options ' ) ,
) ,
migrations . AddField (
model_name = ' orderedfood ' ,
name = ' order ' ,
field = models . ForeignKey ( on_delete = django . db . models . deletion . PROTECT , to = ' sheets.Order ' , verbose_name = ' order ' ) ,
) ,
migrations . AddField (
model_name = ' order ' ,
name = ' sheet ' ,
field = models . ForeignKey ( on_delete = django . db . models . deletion . PROTECT , to = ' sheets.Sheet ' , verbose_name = ' note sheet ' ) ,
) ,
migrations . AddField (
model_name = ' meal ' ,
name = ' sheet ' ,
field = models . ForeignKey ( on_delete = django . db . models . deletion . CASCADE , to = ' sheets.Sheet ' , verbose_name = ' note sheet ' ) ,
) ,
migrations . AddField (
model_name = ' food ' ,
name = ' sheet ' ,
field = models . ForeignKey ( on_delete = django . db . models . deletion . CASCADE , to = ' sheets.Sheet ' , verbose_name = ' note sheet ' ) ,
) ,
]