Add lawyer information reporting interface and update routes

This commit is contained in:
nepiedg
2026-01-09 10:37:57 +00:00
parent 0d97946123
commit 0b26ba6d35
7 changed files with 172 additions and 1 deletions
+21
View File
@@ -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
}