Commit dbe5d5cf authored by Matthew Dizon's avatar Matthew Dizon

updated models

parent 09ac6580
Pipeline #1931 canceled with stages
# Generated by Django 3.0.5 on 2021-05-27 03:47
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('Kiosk', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='customer',
name='name',
field=models.CharField(max_length=250, unique=True),
),
migrations.AlterField(
model_name='food',
name='name',
field=models.CharField(max_length=250, unique=True),
),
]
...@@ -15,7 +15,7 @@ class Account(models.Model): ...@@ -15,7 +15,7 @@ class Account(models.Model):
return f"Username: {self.username}, Password: {self.password}" return f"Username: {self.username}, Password: {self.password}"
class Food(models.Model): class Food(models.Model):
name = models.CharField(max_length=250) name = models.CharField(max_length=250, unique=True)
description = models.CharField(max_length=250) description = models.CharField(max_length=250)
price = models.FloatField(max_length=250) price = models.FloatField(max_length=250)
created_at = models.DateTimeField(auto_now_add=True) created_at = models.DateTimeField(auto_now_add=True)
...@@ -33,7 +33,7 @@ class Food(models.Model): ...@@ -33,7 +33,7 @@ class Food(models.Model):
return f"{self.pk}: {self.name} - {self.price}, {self.description} created at: {self.created_at}" return f"{self.pk}: {self.name} - {self.price}, {self.description} created at: {self.created_at}"
class Customer(models.Model): class Customer(models.Model):
name = models.CharField(max_length=250) name = models.CharField(max_length=250, unique=True)
address = models.CharField(max_length=250) address = models.CharField(max_length=250)
city = models.CharField(max_length=250) city = models.CharField(max_length=250)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment