How to set the field default value of another model in django based on the field value of another model

one of my model has a field value that needs a default value, such as

class Earnings(models.Model):
    earing_num=models.DecimalField(default=)

but the setting of the default value depends on a field value of another model

class Product(models.Model):
    earning_type=models.CharField()

if earning_type is A, the default value is 1
if earning_type _ type is B, the default value is 2

how to achieve

Mar.03,2021

redefine objects and then rewrite the create method

Menu