怎样才能两列同时关联一张表?
class Job_title(models.Model):job = models.CharField(verbose_name='职称管理', max_length=50)
class Meta:
verbose_name = '职称管理'
verbose_name_plural = '职称管理'
def __str__(self):
return self.job
class Employees(models.Model):
name = models.CharField(verbose_name='姓名', max_length=50)
sex = models.CharField(verbose_name='性别', max_length=50)
files_id = models.CharField(verbose_name='档案编号', max_length=50)
id_number = models.CharField(verbose_name='身份证号', max_length=50)
native_place = models.CharField(verbose_name='籍贯', max_length=50)
nation = models.CharField(verbose_name='民族', max_length=50)
birthdate = models.DateField(verbose_name='出生日期')
work_date = models.DateField(verbose_name='参加工作时间')
join_date = models.DateField(verbose_name='进入医院时间')
o_education = models.CharField(verbose_name='最初学历', max_length=50)
n_education = models.CharField(verbose_name='最高学历', max_length=50)
job_title = models.ForeignKey(Job_title, verbose_name='现凭职称', on_delete=models.CASCADE, blank=True, null=True)
employ_date = models.DateField(verbose_name='凭现职称时间')
u_job_title=models.ForeignKey(Job_title, verbose_name='未凭职称', on_delete=models.CASCADE, blank=True, null=True)
# get_date = models.DateField(verbose_name='取得未凭时间', blank=True, null=True)
怎样才能两列同时关联一张表?麻烦哪位老师帮忙指点