...
|
...
|
@@ -34,7 +34,6 @@ func (repo *SummaryEvaluationValueRepository) TransformToDomain(d *models.Summar |
|
|
Rating: d.Rating,
|
|
|
CreatedAt: d.CreatedAt,
|
|
|
UpdatedAt: d.UpdatedAt,
|
|
|
DeletedAt: d.DeletedAt,
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
@@ -51,7 +50,6 @@ func (repo *SummaryEvaluationValueRepository) Save(param *domain.SummaryEvaluati |
|
|
Remark: param.Remark,
|
|
|
CreatedAt: param.CreatedAt,
|
|
|
UpdatedAt: param.UpdatedAt,
|
|
|
DeletedAt: param.DeletedAt,
|
|
|
}
|
|
|
db := repo.transactionContext.PgTx
|
|
|
if m.Id == 0 {
|
...
|
...
|
@@ -74,11 +72,8 @@ func (repo *SummaryEvaluationValueRepository) Save(param *domain.SummaryEvaluati |
|
|
|
|
|
func (repo *SummaryEvaluationValueRepository) Remove(id int) error {
|
|
|
tx := repo.transactionContext.PgTx
|
|
|
nowTime := time.Now()
|
|
|
_, err := tx.Model(&models.SummaryEvaluationValue{}).
|
|
|
Where("id=?", id).
|
|
|
Set("deleted_at=?", nowTime).
|
|
|
Update()
|
|
|
Where("id=?", id).Delete()
|
|
|
return err
|
|
|
}
|
|
|
|
...
|
...
|
@@ -104,8 +99,7 @@ func (repo *SummaryEvaluationValueRepository) FindOne(queryOptions map[string]in |
|
|
func (repo *SummaryEvaluationValueRepository) Find(queryOptions map[string]interface{}) (int, []*domain.SummaryEvaluationValue, error) {
|
|
|
tx := repo.transactionContext.PgTx
|
|
|
var m []*models.SummaryEvaluationValue
|
|
|
query := tx.Model(&m).
|
|
|
Where("deleted_at isnull")
|
|
|
query := tx.Model(&m)
|
|
|
if v, ok := queryOptions["limit"].(int); ok {
|
|
|
query.Limit(v)
|
|
|
}
|
...
|
...
|
|