I have a scenerio for which im trying to create the database models but I'm not able to find a perfect way to do it Scenerio is as follows .
- let's say there is a company which gives offer on his(companies own site) site and a different offer on other site(like Amazon)
- I want to store company details for which I did something as below.
- Next I have created the Direct Offers
- Last I have created Vendors offer
- All the models are as below
class Company(models.Model):
name= models.CharField(max_length=50, null=True)
address= models.CharField(max_length=250, null=True)
class DirectOffers(models.Model):
Smartphone= models.FloatField(max_length=50, null=True)
class VendorsOffers(models.Model):
Smartphone= models.FloatField(max_length=50, null=True)
category = models.CharField(max_length=250, null=True)
owner=models.ForeigKeyField("Company",on_delete=models.CASCADE)
But the above doesn't seems right So any help or guidance will be a great help.
Offerstable only, and then can have boolean fields likefor_vendorsandfor_direct?