def __str__(self): """ method str """ self.__dict__.update({ "created_at": time_conversor(self.created_at), "updated_at": time_conversor(self.updated_at), "name": self.name, "__class__": self.__class__.__name__ }) return "[{:s}] ({:s}) {}".format(self.__class__.__name__, self.id, self.__dict__)
def __str__(self): """ method str """ self.__dict__.update({ "created_at": time_conversor(self.created_at), "updated_at": time_conversor(self.updated_at), "place_id": self.place_id, "user_id": self.user_id, "text": self.text, "__class__": self.__class__.__name__ }) return "[{:s}] ({:s}) {}".format(self.__class__.__name__, self.id, self.__dict__)
def __str__(self): """ method init """ self.__dict__.update({ "created_at": time_conversor(self.created_at), "updated_at": time_conversor(self.updated_at), "email": self.email, "password": self.password, "first_name": self.first_name, "last_name": self.last_name, "__class__": self.__class__.__name__ }) return "[{:s}] ({:s}) {}".format( self.__class__.__name__, self.id, self.__dict__)
def to_dict(self): """ method to dict """ if type(self.created_at) in [str]: self.created_at = time_conversor(self.created_at) if type(self.updated_at) in [str]: self.updated_at = time_conversor(self.updated_at) self.__dict__.update({ "email": self.email, "password": self.password, "first_name": self.first_name, "last_name": self.last_name, "created_at": self.created_at.strftime('%Y-%m-%dT%H:%M:%S.%f%z'), "updated_at": self.updated_at.strftime('%Y-%m-%dT%H:%M:%S.%f%z'), "__class__": self.__class__.__name__ }) return self.__dict__
def to_dict(self): """ method to dict """ if type(self.created_at) in [str]: self.created_at = time_conversor(self.created_at) if type(self.updated_at) in [str]: self.updated_at = time_conversor(self.updated_at) self.__dict__.update({ "name": self.name, "created_at": self.created_at.strftime('%Y-%m-%dT%H:%M:%S.%f%z'), "updated_at": self.updated_at.strftime('%Y-%m-%dT%H:%M:%S.%f%z'), "__class__": self.__class__.__name__ }) return self.__dict__
def to_dict(self): """ method to_dict """ if type(self.created_at) in [str]: self.created_at = time_conversor(self.created_at) if type(self.updated_at) in [str]: self.updated_at = time_conversor(self.updated_at) self.__dict__.update({ "city_id": self.city_id, "user_id": self.user_id, "name": self.name, "description": self.description, "number_rooms": self.number_rooms, "number_bathrooms": self.number_bathrooms, "max_guest": self.max_guest, "price_by_night": self.price_by_night, "latitude": self.latitude, "longitude": self.longitude, "amenity_ids": self.amenity_ids, "created_at": self.created_at.strftime('%Y-%m-%dT%H:%M:%S.%f%z'), "updated_at": self.updated_at.strftime('%Y-%m-%dT%H:%M:%S.%f%z'), "__class__": self.__class__.__name__ }) return self.__dict__
def __str__(self): """ method str """ self.__dict__.update({ "created_at": time_conversor(self.created_at), "updated_at": time_conversor(self.updated_at), "city_id": self.city_id, "user_id": self.user_id, "name": self.name, "description": self.description, "number_rooms": self.number_rooms, "number_bathrooms": self.number_bathrooms, "max_guest": self.max_guest, "price_by_night": self.price_by_night, "latitude": self.latitude, "longitude": self.longitude, "amenity_ids": self.amenity_ids, "__class__": self.__class__.__name__ }) return "[{:s}] ({:s}) {}".format(self.__class__.__name__, self.id, self.__dict__)