Add lawyer information reporting interface and update routes
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gorm.io/gorm"
|
||||
|
||||
lawyermodel "wx_service/internal/lawyer/model"
|
||||
)
|
||||
|
||||
type Service struct {
|
||||
db *gorm.DB
|
||||
}
|
||||
|
||||
func NewService(db *gorm.DB) *Service {
|
||||
return &Service{db: db}
|
||||
}
|
||||
|
||||
func (s *Service) CreateLawyer(ctx context.Context, lawyer *lawyermodel.Lawyer) error {
|
||||
return s.db.WithContext(ctx).Create(lawyer).Error
|
||||
}
|
||||
Reference in New Issue
Block a user