fix: add new fields on subscribe plan, and change status type to number in subscribe
This commit is contained in:
@@ -8,9 +8,12 @@ import (
|
||||
|
||||
func (sb *impl) Create(spec subscribeplandomain.SubscribePlanReq) error {
|
||||
data := subscribeplandomain.SubscribePlan{
|
||||
ID: uuid.NewString(),
|
||||
Code: spec.Code,
|
||||
Name: spec.Name,
|
||||
ID: uuid.NewString(),
|
||||
Code: spec.Code,
|
||||
Name: spec.Name,
|
||||
Length: spec.Length,
|
||||
Price: spec.Price,
|
||||
Status: spec.Status,
|
||||
}
|
||||
return sb.subsRepo.Create(data)
|
||||
}
|
||||
|
||||
@@ -10,6 +10,9 @@ func (i *impl) Update(id string, spec subscribeplandomain.SubscribePlanUpdate) e
|
||||
ID: id,
|
||||
Code: spec.Code,
|
||||
Name: spec.Name,
|
||||
Length: spec.Length,
|
||||
Price: spec.Price,
|
||||
Status: spec.Status,
|
||||
UpdatedAt: timeutils.Now(),
|
||||
}
|
||||
return i.subsRepo.Update(newData)
|
||||
|
||||
Reference in New Issue
Block a user