@ -1,4 +1,53 @@
|
|||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
# Create your models here.
|
class UserList(models.Model):
|
||||||
|
UserID = models.AutoField(primary_key=True) # 自动增长主键
|
||||||
|
UserName = models.CharField(max_length=50)
|
||||||
|
PassWord = models.CharField(max_length=50)
|
||||||
|
Role = models.CharField(max_length=50)
|
||||||
|
class Meta:
|
||||||
|
db_table = 'UserList' # 数据库表名称
|
||||||
|
|
||||||
|
class UserDishList(models.Model):
|
||||||
|
DishID = models.AutoField(primary_key=True) # 自动增长主键
|
||||||
|
DishName = models.CharField(max_length=50)
|
||||||
|
DishDescription = models.CharField(max_length=255)
|
||||||
|
UserID = models.ForeignKey('UserList', on_delete=models.CASCADE, db_column='UserID')
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
db_table = 'UserDishList' # 数据库表名称
|
||||||
|
|
||||||
|
class PopularDishList(models.Model):
|
||||||
|
DishID = models.IntegerField(primary_key=True)
|
||||||
|
DishName = models.CharField(max_length=50)
|
||||||
|
CollectNumber = models.IntegerField()
|
||||||
|
LikeNumber = models.IntegerField()
|
||||||
|
WebLink = models.CharField(max_length=255)
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
db_table = 'PopularDishList'
|
||||||
|
|
||||||
|
class MainDishList(models.Model):
|
||||||
|
DishID = models.IntegerField(primary_key=True)
|
||||||
|
DishName = models.CharField(max_length=50)
|
||||||
|
CollectNumber = models.IntegerField()
|
||||||
|
LikeNumber = models.IntegerField()
|
||||||
|
WebLink = models.CharField(max_length=255)
|
||||||
|
stuff = models.CharField(max_length=255)
|
||||||
|
difficulty = models.CharField(max_length=255)
|
||||||
|
tags = models.CharField(max_length=255)
|
||||||
|
tools = models.CharField(max_length=255)
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
db_table = 'maindishlist'
|
||||||
|
|
||||||
|
class CollectDishList(models.Model):
|
||||||
|
DishID = models.IntegerField(primary_key=True)
|
||||||
|
DishName = models.CharField(max_length=50)
|
||||||
|
CollectNumber = models.IntegerField()
|
||||||
|
LikeNumber = models.IntegerField()
|
||||||
|
WebLink = models.CharField(max_length=255)
|
||||||
|
UserID = models.ForeignKey('UserList', on_delete=models.CASCADE, db_column='UserID')
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
db_table = 'CollectDishList'
|
Before Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 619 B |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 81 KiB |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 93 KiB |
After Width: | Height: | Size: 96 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 77 KiB |
After Width: | Height: | Size: 77 KiB |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 69 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 77 KiB |
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 47 KiB |
After Width: | Height: | Size: 61 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 47 KiB |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 61 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 83 KiB |
After Width: | Height: | Size: 83 KiB |
After Width: | Height: | Size: 83 KiB |
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 88 KiB |
After Width: | Height: | Size: 88 KiB |
After Width: | Height: | Size: 88 KiB |
After Width: | Height: | Size: 61 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 47 KiB |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 75 KiB |
After Width: | Height: | Size: 75 KiB |
After Width: | Height: | Size: 51 KiB |
After Width: | Height: | Size: 69 KiB |
After Width: | Height: | Size: 69 KiB |
After Width: | Height: | Size: 89 KiB |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 59 KiB |
After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 59 KiB |
After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 63 KiB |
After Width: | Height: | Size: 63 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 58 KiB |