package service import ( "aps_crm/model" "aps_crm/pkg/ecode" ) type VettingService struct{} func (VettingService) AddVetting(vetting *model.Vetting) int { err := model.NewVettingSearch().Create(vetting) if err != nil { return ecode.VettingExist } return ecode.OK } func (VettingService) UpdateVetting(vetting *model.Vetting) int { err := model.NewVettingSearch().Update(vetting) if err != nil { return ecode.VettingExist } return ecode.OK }