2021-02-06 12:31:59 +01:00
# Generated by Django 3.1.3 on 2021-02-06 09:49
2021-01-17 17:10:04 +01:00
from django . conf import settings
from django . db import migrations , models
import django . db . models . deletion
import django . utils . timezone
class Migration ( migrations . Migration ) :
initial = True
dependencies = [
2021-02-06 12:31:59 +01:00
( ' camper ' , ' 0001_initial ' ) ,
2021-01-17 17:10:04 +01:00
migrations . swappable_dependency ( settings . AUTH_USER_MODEL ) ,
]
operations = [
migrations . CreateModel (
name = ' Reservation ' ,
fields = [
( ' id ' , models . AutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
2021-02-06 12:31:59 +01:00
( ' created_date ' , models . DateTimeField ( auto_now_add = True ) ) ,
2021-01-17 17:10:04 +01:00
( ' reservation_start_date ' , models . DateField ( default = django . utils . timezone . now ) ) ,
( ' reservation_end_date ' , models . DateField ( ) ) ,
2021-02-06 12:31:59 +01:00
( ' reservation_cost ' , models . DecimalField ( decimal_places = 2 , default = 0 , max_digits = 12 ) ) ,
( ' message_to_owner ' , models . TextField ( blank = True , max_length = 500 , null = True ) ) ,
2021-01-17 17:10:04 +01:00
( ' status ' , models . CharField ( choices = [ ( ' Confirmed ' , ' Rezerwacja potwierdzona ' ) , ( ' Requsted ' , ' Oczekuję na potwierdzenie ' ) , ( ' Cancelled ' , ' Anulowana ' ) , ( ' In_progress ' , ' Trwająca rezerwacja ' ) ] , max_length = 50 ) ) ,
2021-02-06 12:31:59 +01:00
( ' slug ' , models . SlugField ( default = ' ' , editable = False , max_length = 255 ) ) ,
( ' offer ' , models . ForeignKey ( on_delete = django . db . models . deletion . CASCADE , to = ' camper.offer ' , verbose_name = ' Offer ' ) ) ,
( ' user ' , models . ForeignKey ( on_delete = django . db . models . deletion . CASCADE , to = settings . AUTH_USER_MODEL , verbose_name = ' User ' ) ) ,
2021-01-17 17:10:04 +01:00
] ,
) ,
]