creating a custom entity which stores multiple bundles as per user input? I want to create an custom entity(Lets say payroll entity) which has the following fields
1. Basic salary
2. Earnings
3. Deductions

It is possible by Entities

But now I would like to add some new feature


Basic salary(field)
Earnings(Bundle) contains (bun1, bun2, bun3 fields)
Deduction(Bundle ded1,ded2 and ded3 fields )


If a user wants to set his employee's Earnings and other details he can manual sets it .For an example if a user needs to set his/her employee's salary like daily allowance, travel allowance, bonus etc)  he/she can do it from their own choice . And there should not be any restrictions for the no. of fields to add either bundles or fields . A user add custom bundles as well as custom fields.
Satyabrata, 

Not sure i got the requirement correct. Have you considered using entity reference + inline entity form? You can attach bundles to the main bundle and can create them (sub bundles) from the main bundle using inline entity form .

Hope it helps.