Пример #1
0
    def __init__(
        self, 
        **kwargs
    ):
        nk = kwargs



        if "project" in kwargs.keys() and kwargs["project"] is not None:
            p = obj.Project(**kwargs["project"])
            nk["project"] = p

        if "task" in kwargs.keys() and kwargs["task"] is not None:
            t = obj.ProjectTask(**kwargs["task"])
            nk["task"] = t

        if "customer" in kwargs.keys() and kwargs["customer"] is not None:
            c = obj.Company(**kwargs["customer"])
            nk["customer"] = c

        if "user" in kwargs.keys() and kwargs["user"] is not None:
            u = obj.User(**kwargs["user"])
            nk["user"] = u
    
        self.__dict__.update(nk)
        
Пример #2
0
    def __init__(self, **kwargs):
        nk = kwargs

        if "project" in kwargs.keys() and kwargs["project"] is not None:
            p = obj.Project(**kwargs["project"])
            nk["project"] = p

        self.__dict__.update(nk)
Пример #3
0
    def __init__(self, **kwargs):

        nk = kwargs
        if "project" in kwargs.keys() and kwargs["project"] is not None:
            p = obj.Project(**kwargs["project"])
            nk["project"] = p

        if "deal" in kwargs.keys() and kwargs["deal"] is not None:
            d = obj.Deal(**kwargs["deal"])
            nk["deal"] = d

        if "company" in kwargs.keys() and kwargs["company"] is not None:
            c = obj.Company(**kwargs["company"])
            nk["company"] = c

        self.__dict__.update(nk)