Using an AutoField to reference another model.

I have a request model where end user will input the necessary details and data needed to proceed. There are 2 different models that will store certain data and the request number from the request will be linked to the different models depending on the end users choice.

Is there a question here for which you are requesting assistance?

If you are having difficulty with a design, then it would be helpful if you were more detailed with your description of the issue, including any code you’ve written for your models (or table design if you haven’t gotten as far as any code). Also, please identify what part of this you are having difficulty with.

What I wanna do is be able to upon the user creating a ConArRequest they will be given a request number.
And base on their choices if its ‘AR’ or ‘CD’ the request number will be to one of the models. When the request is made the system will assign the request number to Accounts Receivable or Container Deposit models respectively. Giving them a unique identifier for each requests.



class ConArRequest(models.Model):  
    TYPEOFFORM = {
        
        'AR': "Accounts Receivable",
        'CD': "Container Deposit",
    }
    
    #general Data Collection
    created_at = models.DateTimeField(auto_now_add=True)
    updated_at = models.DateTimeField(auto_now=True)
    email = models.EmailField(Emails, max_length=255)
    bl_number = models.ForeignKey(BLNumber,max_length=255, on_delete=models.CASCADE)
    
    request_type = models.CharField(max_length=10, choices=TYPEOFFORM)
    request_number = models.AutoField(primary_key=True, editable=False)
    
    
class ContainerDeposit(models.Model):
    condep_bl_number = models.CharField(max_length=255, blank=True, null=True)
    request_num = models.AutoField(primary_key=True, editable=False)
    batch_name = models.CharField(max_length=255, blank=True, null=True)
    
    def __str__(self):
        return str(self.batch_name)


class ARCollection(models.Model):
    arc_bl_number = models.CharField(max_length=255, blank=True, null=True)
    request_num = models.AutoField(primary_key=True, editable=False)
    consignee_name = models.CharField(max_length=255, blank=True, null=True)
 
    
    def __str__(self):
        return str(self.consignee_name)