会议室预订系统(meeting room booking system)
一、目标及业务流程
期望效果:
业务流程:
- 用户登录
- 预定会议室
- 退订会议室
- 选择日期;今日以及以后日期
二、表结构设计和生成
1、models.py(用户继承AbstractUser)
from django.db import models # Create your models here. from django.db import models from django.contrib.auth.models import AbstractUser class UserInfo(AbstractUser): """用户信息表""" tel = models.CharField(max_length=32) class Room(models.Model): """会议室表""" caption = models.CharField(max_length=32) # 会议室名字 num = models.IntegerField() # 会议室容纳人数 def __str__(self): return self.caption class Book(models.Model):from django.db import models # Create your models here. from django.db import models from django.contrib.auth.models import AbstractUser class UserInfo(AbstractUser): """用户信息表""" tel = models.CharField(max_length=32) class Room(models.Model): """会议室表""" caption = models.CharField(max_length=32) # 会议室名字 num = models.IntegerField() # 会议室容纳人数 def __str__(self): return self.caption class Book(models.Model):