import random from data.ClientParams import ClientParams from data.enum.CompanySize import CompanySize class ClientParamsFactory: def __init__(self) -> None: super().__init__() def getTrueMore(self, perOfTrue: int) -> bool: custom = random.randint(0, perOfTrue) return custom > 0 def get_client_params(self) -> ClientParams: payment_delay = random.randint(0, 14) payed = self.getTrueMore(5) net_worth = random.randint(0, 100) is_skarbowka = not self.getTrueMore(5) membership = random.getrandbits(1) infuelnce_rate = random.randint(0, 100) is_hat = random.getrandbits(1) company_size = random.randint(1,6) return ClientParams( payment_delay, net_worth, infuelnce_rate, bool(payed), bool(is_skarbowka), bool(membership), bool(is_hat), CompanySize(company_size) )