refactor: shorten model and table prefixes

This commit is contained in:
2026-07-23 14:30:17 +08:00
parent 6e7be2f3a4
commit 0ca2898ac0
71 changed files with 707 additions and 638 deletions

View File

@@ -14,11 +14,11 @@ func NewService() *Service {
return &Service{}
}
func (s *Service) CreateNote(projectID uint, userID uint, title string, markdown string) (*models.SenlinAgentNote, error) {
func (s *Service) CreateNote(projectID uint, userID uint, title string, markdown string) (*models.SaNote, error) {
title = strings.TrimSpace(title)
if title == "" {
return nil, errors.New("note title is required")
}
note := &models.SenlinAgentNote{ProjectID: projectID, CreatedBy: userID, Title: title, Markdown: markdown}
note := &models.SaNote{ProjectID: projectID, CreatedBy: userID, Title: title, Markdown: markdown}
return note, models.DBService.Create(note).Error
}