from django.db import models # Create your models here. #用户表 class user(models.Model): username = models.CharField(max_length=200,unique=True) password = models.CharField(max_length=200) #学生表 class student(models.Model): student_xuehao=models.IntegerField(default=0) student_name = models.CharField(max_length=200,null=True, blank=True) student_major = models.CharField(max_length=200,null=True, blank=True) student_class = models.CharField(max_length=200,null=True, blank=True) student_score = models.FloatField(default=0) teather=models.ForeignKey(to='user',to_field='id',on_delete=models.CASCADE)