...
|
...
|
@@ -41,6 +41,7 @@ func (repository *ProductCalendarRepository) Save(productCalendar *domain.Produc |
|
|
"updated_at",
|
|
|
"deleted_at",
|
|
|
"ext",
|
|
|
"break_time_periods",
|
|
|
}
|
|
|
insertFieldsSnippet := sqlbuilder.SqlFieldsSnippet(sqlbuilder.RemoveSqlFields(sqlBuildFields, "product_calendar_id", "deleted_at"))
|
|
|
insertPlaceHoldersSnippet := sqlbuilder.SqlPlaceHoldersSnippet(sqlbuilder.RemoveSqlFields(sqlBuildFields, "product_calendar_id", "deleted_at"))
|
...
|
...
|
@@ -65,6 +66,7 @@ func (repository *ProductCalendarRepository) Save(productCalendar *domain.Produc |
|
|
&productCalendar.UpdatedAt,
|
|
|
&productCalendar.DeletedAt,
|
|
|
&productCalendar.Ext,
|
|
|
&productCalendar.BreakTimePeriods,
|
|
|
),
|
|
|
fmt.Sprintf("INSERT INTO manufacture.product_calendar (%s) VALUES (%s) RETURNING %s", insertFieldsSnippet, insertPlaceHoldersSnippet, returningFieldsSnippet),
|
|
|
productCalendar.CompanyId,
|
...
|
...
|
@@ -79,6 +81,7 @@ func (repository *ProductCalendarRepository) Save(productCalendar *domain.Produc |
|
|
productCalendar.CreatedAt,
|
|
|
productCalendar.UpdatedAt,
|
|
|
productCalendar.Ext,
|
|
|
productCalendar.BreakTimePeriods,
|
|
|
); err != nil {
|
|
|
return productCalendar, err
|
|
|
}
|
...
|
...
|
@@ -99,6 +102,7 @@ func (repository *ProductCalendarRepository) Save(productCalendar *domain.Produc |
|
|
&productCalendar.UpdatedAt,
|
|
|
&productCalendar.DeletedAt,
|
|
|
&productCalendar.Ext,
|
|
|
&productCalendar.BreakTimePeriods,
|
|
|
),
|
|
|
fmt.Sprintf("UPDATE manufacture.product_calendar SET %s WHERE product_calendar_id=? RETURNING %s", updateFieldsSnippet, returningFieldsSnippet),
|
|
|
productCalendar.CompanyId,
|
...
|
...
|
@@ -113,6 +117,7 @@ func (repository *ProductCalendarRepository) Save(productCalendar *domain.Produc |
|
|
productCalendar.CreatedAt,
|
|
|
productCalendar.UpdatedAt,
|
|
|
productCalendar.Ext,
|
|
|
productCalendar.BreakTimePeriods,
|
|
|
productCalendar.Identify(),
|
|
|
); err != nil {
|
|
|
return productCalendar, err
|
...
|
...
|
|