feat: update Category model and request struct to use pointers for description and sequence fields

This commit is contained in:
Ardeman
2025-03-08 00:05:04 +08:00
parent c5eb6302ab
commit a47b7b7d3d
2 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -12,8 +12,8 @@ func (a *accessor) CreateModel(spec categorydomain.CategoryReq) error {
ID: uuid.NewString(),
Name: spec.Name,
Code: spec.Code,
Description: spec.Description,
Sequence: spec.Sequence,
Description: *spec.Description,
Sequence: *spec.Sequence,
}
if err := a.db.Create(&data).Error; err != nil {