From f09c135536ec0bf06f6cd15f9bb63ed8bfeb7140 Mon Sep 17 00:00:00 2001 From: p9bpuj83o <1034931443@qq.com> Date: Mon, 3 Jun 2024 22:50:10 +0800 Subject: [PATCH] ADD file via upload --- models.py | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 models.py diff --git a/models.py b/models.py new file mode 100644 index 0000000..0ab4835 --- /dev/null +++ b/models.py @@ -0,0 +1,45 @@ +from django.db import models + +# Create your models here. + +class TravelInfo(models.Model): + id = models.AutoField('id',primary_key=True) + title = models.CharField('景区名',max_length=255,default='') + level = models.CharField('等级',max_length=255,default='') + discount = models.CharField('折扣', max_length=255, default='') + saleCount = models.CharField('销量', max_length=255, default='') + province = models.CharField('省份',max_length=255,default='') + star = models.CharField('热度', max_length=255, default='') + detailAddress = models.CharField('景点详情地址', max_length=255, default='') + shortIntro = models.CharField('短评', max_length=255, default='') + detailUrl = models.CharField('详情地址', max_length=255, default='') + score = models.CharField('评分', max_length=255, default='') + price = models.CharField('价格', max_length=255, default='') + commentsLen = models.CharField('评论个数', max_length=255, default='') + detailIntro = models.CharField('详情简介', max_length=2550, default='') + img_list = models.CharField('照片列表', max_length=2550, default='') + comments = models.TextField('用户评论', default='') + cover = models.CharField('封面', max_length=2550, default='') + createTime = models.DateField('爬取时间', auto_now_add=True) + +class User(models.Model): + id = models.AutoField('id', primary_key=True) + username = models.CharField('用户名', max_length=255, default='') + password = models.CharField('密码', max_length=255, default='') + sex = models.CharField('性别', max_length=255, default='') + address = models.CharField('地址', max_length=255, default='') + avatar = models.FileField('头像', max_length=255, default='') + textarea = models.CharField('个人简介', max_length=255, default='这个人很懒什么也没留下。') + createTime = models.DateField('创建时间', auto_now_add=True) + ZHlei = models.CharField('账户类型', max_length=255, default='') + +class SaleTicketDetail(models.Model): + id = models.AutoField('id', primary_key=True) + title = models.CharField('景区名', max_length=255, default='') + day = models.CharField('预约日期',max_length=50,default='') + name = models.CharField('姓名', max_length=50, default='') + Idcard = models.CharField('身份证号', max_length=50, default='') + connection = models.CharField('联系方式', max_length=100, default='') + + +