Database design two tables have One2One connection with another - django - models
I'm working on a project which has several models but two of them are Invoice and the other for Payment, in the both tables should have a field named next_payment
for the loaners to determine when he/she should pay his/her loan
class Payment(models.Model):
admin = models.ForeignKey(User,on_delete=models.CASCADE)
price = models.DecimalField(max_digits=20,decimal_places=3)
#others
class Invoice(models.Model):
seller = models.ForeignKey(User,on_delete=models.PROTECT)
customer = models.CharField(max_length=50)
#others
should i add new fields named next_payment
for both two models or create a new model , something like this
class NextPayment(models.Model):
next_payment = models.DateTimeField()
and add NextPayment has OneToOne connection for two both models ? which one is the most effective way please ? thank you in advance ..