How to create an order with also seller as a foreign key to the orders table similar to customer field?

Hello all,

Here is some customization, I am trying to achieve. In creating rest API’s using DRF section, for the orders API, while creating orders we are getting the user id or creating one if it not exists from the customer object. Now, consider there is another model seller which has same foreign key relationship similar to customer field to the orders table.

Now what to do in this situation to create an order? How to get the user id with both customer and seller in the serializer and what changes has to be done for the view?

Whole orders api is the same, just I have added the sellers model with three fields seller_name, phone and foreign key to user model.

Here is my code for