Exemplo n.º 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)
        
Exemplo n.º 2
0
    def __init__(self, **kwargs):
        nk = kwargs

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

        if "leader" in kwargs.keys() and kwargs["leader"] is not None:
            u = obj.User(**kwargs["leader"])
            nk["leader"] = u

        if "contracts" in kwargs.keys() and kwargs["contracts"] is not None:
            items = []
            for c in kwargs["contracts"]:
                items.append(obj.ProjectContract(**c))
            nk["contracts"] = items

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

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

        self.__dict__.update(nk)
Exemplo n.º 3
0
    def __init__(self, **kwargs):
        nk = kwargs

        if "user" in kwargs.keys():
            u = obj.User(**kwargs["user"])
            nk["user"] = u

        self.__dict__.update(nk)
Exemplo n.º 4
0
    def __init__(self, **kwargs):
        nk = kwargs

        if "users" in kwargs.keys() and kwargs["users"] is not None:
            items = []
            for u in kwargs["users"]:
                items.append(obj.User(**u))
            nk["users"] = items

        self.__dict__.update(nk)
Exemplo n.º 5
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 "user" in kwargs.keys() and kwargs["user"] is not None:
            u = obj.User(**kwargs["user"])
            nk["user"] = u

        self.__dict__.update(nk)
Exemplo n.º 6
0
    def __init__(self, **kwargs):
        nk = kwargs

        if "assignment" in kwargs.keys() and kwargs["assignment"] is not None:
            a = ScheduleAssignment(**kwargs["assignment"])
            nk["assignment"] = a

        if "user" in kwargs.keys() and kwargs["user"] is not None:
            u = obj.User(**kwargs["user"])
            nk["user"] = u

        self.__dict__.update(nk)
Exemplo n.º 7
0
    def __init__(
        self,
        **kwargs
        ):

        nk = kwargs

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

        if "user" in kwargs.keys() and kwargs["user"] is not None:
            nk["user"] = obj.User(**kwargs["user"])

        self.__dict__.update(nk)
Exemplo n.º 8
0
    def __init__(self, **kwargs):
        nk = kwargs

        if "from" in kwargs.keys():
            nk["from_time"] = kwargs["from"]
            del nk["from"]

        if "to" in kwargs.keys():
            nk["to_time"] = kwargs["to"]
            del nk["to"]

        if "user" in kwargs.keys() and kwargs["user"] is not None:
            u = obj.User(**kwargs["user"])
            nk["user"] = u

        self.__dict__.update(nk)
Exemplo n.º 9
0
    def __init__(self, **kwargs):

        nk = kwargs

        if "user" in kwargs.keys() and kwargs["user"] is not None:
            u = obj.User(**kwargs["user"])
            nk["user"] = u

        if "category" in kwargs.keys() and kwargs["category"] is not None:
            cat = obj.DealCategory(**kwargs["category"])
            nk["category"] = cat

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

        self.__dict__.update(nk)