func (j *JobRun) ToJobRun(jr *sdk.WorkflowNodeJobRun) (err error) {
	j.ProjectID = jr.ProjectID
	j.ID = jr.ID
	j.WorkflowNodeRunID = jr.WorkflowNodeRunID
	j.Job, err = gorpmapping.JSONToNullString(jr.Job)
	if err != nil {
		return sdk.WrapError(err, "column job")
	}
	j.Parameters, err = gorpmapping.JSONToNullString(jr.Parameters)
	if err != nil {
		return sdk.WrapError(err, "column variables")
	}
	j.Status = jr.Status
	j.Retry = jr.Retry
	j.Queued = jr.Queued
	j.Start = jr.Start
	j.Done = jr.Done
	j.Model = jr.Model
	j.ModelType = sql.NullString{Valid: true, String: string(jr.ModelType)}
	j.ContainsService = jr.ContainsService
	j.ExecGroups, err = gorpmapping.JSONToNullString(jr.ExecGroups)
	j.WorkerName = jr.WorkerName
	j.HatcheryName = jr.HatcheryName
	if err != nil {
		return sdk.WrapError(err, "column exec_groups")
	}
	j.IntegrationPluginBinaries, err = gorpmapping.JSONToNullString(jr.IntegrationPluginBinaries)
	if err != nil {
		return sdk.WrapError(err, "column integration_plugin_binaries")
	}
	j.Header, err = gorpmapping.JSONToNullString(jr.Header)
	if err != nil {
		return sdk.WrapError(err, "column header")
	}
	return nil
}
// ToJobRun transform the JobRun with data of the provided sdk.WorkflowNodeJobRun
ToJobRun transform the JobRun with data of the provided sdk.WorkflowNodeJobRun
// ToJobRun transform the JobRun with data of the provided sdk . WorkflowNodeJobRun
func (j *JobRun) ToJobRun(jr *sdk.WorkflowNodeJobRun) (err error) {
	j.ProjectID = jr.ProjectID
	j.ID = jr.ID
	j.WorkflowNodeRunID = jr.WorkflowNodeRunID
	j.Job, err = gorpmapping.JSONToNullString(jr.Job)
	if err != nil {
		return sdk.WrapError(err, "column job")
	}
	j.Parameters, err = gorpmapping.JSONToNullString(jr.Parameters)
	if err != nil {
		return sdk.WrapError(err, "column variables")
	}
	j.Status = jr.Status
	j.Retry = jr.Retry
	j.Queued = jr.Queued
	j.Start = jr.Start
	j.Done = jr.Done
	j.Model = jr.Model
	j.ModelType = sql.NullString{Valid: true, String: string(jr.ModelType)}
	j.ContainsService = jr.ContainsService
	j.ExecGroups, err = gorpmapping.JSONToNullString(jr.ExecGroups)
	j.WorkerName = jr.WorkerName
	j.HatcheryName = jr.HatcheryName
	if err != nil {
		return sdk.WrapError(err, "column exec_groups")
	}
	j.IntegrationPluginBinaries, err = gorpmapping.JSONToNullString(jr.IntegrationPluginBinaries)
	if err != nil {
		return sdk.WrapError(err, "column integration_plugin_binaries")
	}
	j.Header, err = gorpmapping.JSONToNullString(jr.Header)
	if err != nil {
		return sdk.WrapError(err, "column header")
	}
	return nil
}
func ( j * JobRun ) ToJobRun ( jr * sdk . WorkflowNodeJobRun ) ( err error ) { j . ProjectID = jr . ProjectID j . ID = jr . ID j . WorkflowNodeRunID = jr . WorkflowNodeRunID j . Job , err = gorpmapping . JSONToNullString ( jr . Job ) if err != nil { return sdk . WrapError ( err , " " ) } j . Parameters , err = gorpmapping . JSONToNullString ( jr . Parameters ) if err != nil { return sdk . WrapError ( err , " " ) } j . Status = jr . Status j . Retry = jr . Retry j . Queued = jr . Queued j . Start = jr . Start j . Done = jr . Done j . Model = jr . Model j . ModelType = sql . NullString { Valid : true , String : string ( jr . ModelType ) } j . ContainsService = jr . ContainsService j . ExecGroups , err = gorpmapping . JSONToNullString ( jr . ExecGroups ) j . WorkerName = jr . WorkerName j . HatcheryName = jr . HatcheryName if err != nil { return sdk . WrapError ( err , " " ) } j . IntegrationPluginBinaries , err = gorpmapping . JSONToNullString ( jr . IntegrationPluginBinaries ) if err != nil { return sdk . WrapError ( err , " " ) } j . Header , err = gorpmapping . JSONToNullString ( jr . Header ) if err != nil { return sdk . WrapError ( err , " " ) } return nil }
ToJobRun transform the JobRun with data of the provided sdk.WorkflowNodeJobRun
ToJobRun transform the JobRun with data of the provided sdk . WorkflowNodeJobRun