func ConvertWorkItemStorageToModel(wiType *WorkItemType, wi *WorkItemStorage) (*WorkItem, error) {
	result, err := wiType.ConvertWorkItemStorageToModel(*wi)
	if err != nil {
		return nil, errors.NewConversionError(err.Error())
	}
	if _, ok := wiType.Fields[SystemCreatedAt]; ok {
		result.Fields[SystemCreatedAt] = wi.CreatedAt
	}
	if _, ok := wiType.Fields[SystemUpdatedAt]; ok {
		result.Fields[SystemUpdatedAt] = wi.UpdatedAt
	}
	if _, ok := wiType.Fields[SystemOrder]; ok {
		result.Fields[SystemOrder] = wi.ExecutionOrder
	}
	return result, nil

}
// ConvertWorkItemStorageToModel convert work item model to app WI
ConvertWorkItemStorageToModel convert work item model to app WI
// ConvertWorkItemStorageToModel convert work item model to app WI
func ConvertWorkItemStorageToModel(wiType *WorkItemType, wi *WorkItemStorage) (*WorkItem, error) {
	result, err := wiType.ConvertWorkItemStorageToModel(*wi)
	if err != nil {
		return nil, errors.NewConversionError(err.Error())
	}
	if _, ok := wiType.Fields[SystemCreatedAt]; ok {
		result.Fields[SystemCreatedAt] = wi.CreatedAt
	}
	if _, ok := wiType.Fields[SystemUpdatedAt]; ok {
		result.Fields[SystemUpdatedAt] = wi.UpdatedAt
	}
	if _, ok := wiType.Fields[SystemOrder]; ok {
		result.Fields[SystemOrder] = wi.ExecutionOrder
	}
	return result, nil
}
func ConvertWorkItemStorageToModel ( wiType * WorkItemType , wi * WorkItemStorage ) ( * WorkItem , error ) { result , err := wiType . ConvertWorkItemStorageToModel ( * wi ) if err != nil { return nil , errors . NewConversionError ( err . Error ( ) ) } if _ , ok := wiType . Fields [ SystemCreatedAt ] ; ok { result . Fields [ SystemCreatedAt ] = wi . CreatedAt } if _ , ok := wiType . Fields [ SystemUpdatedAt ] ; ok { result . Fields [ SystemUpdatedAt ] = wi . UpdatedAt } if _ , ok := wiType . Fields [ SystemOrder ] ; ok { result . Fields [ SystemOrder ] = wi . ExecutionOrder } return result , nil }
ConvertWorkItemStorageToModel convert work item model to app WI
ConvertWorkItemStorageToModel convert work item model to app WI