作者 王健

更新【公司 仓储】

... ... @@ -16,5 +16,5 @@ type Company struct {
// 更新时间
UpdateAt time.Time
// 删除时间
DeleteAt time.Time
DeleteAt time.Time `pg:",soft_delete"`
}
... ...
... ... @@ -30,7 +30,6 @@ func (repository *CompanyRepository) Save(company *domain.Company) (*domain.Comp
"company_info",
"create_at",
"update_at",
"delete_at",
}
insertFieldsSnippet := sqlbuilder.SqlFieldsSnippet(sqlBuildFields)
insertPlaceHoldersSnippet := sqlbuilder.SqlPlaceHoldersSnippet(sqlBuildFields)
... ... @@ -76,7 +75,6 @@ func (repository *CompanyRepository) Save(company *domain.Company) (*domain.Comp
fmt.Sprintf("UPDATE companies SET %s WHERE company_id=? RETURNING %s", updateFieldsSnippet, returningFieldsSnippet),
company.CompanyId,
company.CompanyInfo,
company.CreateAt,
company.UpdateAt,
... ...