You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
3.9 KiB

8 months ago
from django.db import models
from django.contrib.postgres.fields import JSONField
# Create your models here.
class Dish(models.Model):
8 months ago
name = models.CharField(max_length=255, unique=True, help_text='菜名')
image = models.TextField(help_text='菜品圖片')
likes = models.IntegerField(default=0, help_text='按讚數')
tags = models.TextField(help_text='標籤')
indications = models.TextField(help_text='適應症')
Calories = models.CharField(max_length=255, unique=False, blank=True, null=True, help_text='熱量')
Salt = models.CharField(max_length=255, unique=False, blank=True, null=True, help_text='食鹽相當量')
Protein = models.CharField(max_length=255, unique=False, blank=True, null=True, help_text='蛋白質')
Total_fat = models.CharField(max_length=255, unique=False, blank=True, null=True, help_text='總脂肪')
Total_Carbohydrate = models.CharField(max_length=255, unique=False, blank=True, null=True, help_text='總碳水化合物')
Total_sugar = models.CharField(max_length=255, unique=False, blank=True, null=True, help_text='總糖分')
Dietary_fiber = models.CharField(max_length=255, unique=False, blank=True, null=True, help_text='膳食纖維')
Soluble_fiber = models.CharField(max_length=255, unique=False, blank=True, null=True, help_text='水溶性纖維')
Insoluble_fiber = models.CharField(max_length=255, unique=False, blank=True, null=True, help_text='非水溶性纖維')
K = models.CharField(max_length=255, unique=False, blank=True, null=True, help_text='')
Ca = models.CharField(max_length=255, unique=False, blank=True, null=True, help_text='')
Mg = models.CharField(max_length=255, unique=False, blank=True, null=True, help_text='')
P = models.CharField(max_length=255, unique=False, blank=True, null=True, help_text='')
Fe = models.CharField(max_length=255, unique=False, blank=True, null=True, help_text='')
Zn = models.CharField(max_length=255, unique=False, blank=True, null=True, help_text='')
I = models.CharField(max_length=255, unique=False, blank=True, null=True, help_text='')
Cholesterol = models.CharField(max_length=255, unique=False, blank=True, null=True, help_text='膽固醇')
Vitamin_B1 = models.CharField(max_length=255, unique=False, blank=True, null=True, help_text='維生素B1')
Vitamin_B2 = models.CharField(max_length=255, unique=False, blank=True, null=True, help_text='維生素B2')
Vitamin_C = models.CharField(max_length=255, unique=False, blank=True, null=True, help_text='維生素C')
Vitamin_B6 = models.CharField(max_length=255, unique=False, blank=True, null=True, help_text='維生素B6')
Vitamin_B12 = models.CharField(max_length=255, unique=False, blank=True, null=True, help_text='維生素B12')
Folate = models.CharField(max_length=255, unique=False, blank=True, null=True, help_text='葉酸')
Vitamin_A = models.CharField(max_length=255, unique=False, blank=True, null=True, help_text='維生素A')
Vitamin_D = models.CharField(max_length=255, unique=False, blank=True, null=True, help_text='維生素D')
Vitamin_K = models.CharField(max_length=255, unique=False, blank=True, null=True, help_text='維生素K')
Vitamin_E = models.CharField(max_length=255, unique=False, blank=True, null=True, help_text='維生素E')
Saturated_fatty_acid = models.CharField(max_length=255, unique=False, blank=True, null=True, help_text='飽和脂肪酸')
Monounsaturated_fatty_acid = models.CharField(max_length=255, unique=False, blank=True, null=True, help_text='單元不飽和脂肪酸')
Polyunsaturated_fatty_acid = models.CharField(max_length=255, unique=False, blank=True, null=True, help_text='多元不飽和脂肪酸')
Ingredients = models.TextField(help_text='食材')
Steps = models.JSONField(help_text='製作步驟')
Step_images_Base64 = models.JSONField(help_text='製作步驟圖片')