feat: add description and sequence fields to Create and Update category functions

This commit is contained in:
Ardeman
2025-03-07 23:58:53 +08:00
parent 68f33d101b
commit c5eb6302ab
2 changed files with 7 additions and 5 deletions
+5 -3
View File
@@ -9,9 +9,11 @@ import (
func (a *accessor) CreateModel(spec categorydomain.CategoryReq) error {
data := database.Category{
ID: uuid.NewString(),
Name: spec.Name,
Code: spec.Code,
ID: uuid.NewString(),
Name: spec.Name,
Code: spec.Code,
Description: spec.Description,
Sequence: spec.Sequence,
}
if err := a.db.Create(&data).Error; err != nil {