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

@@ -193,7 +193,7 @@ func randomStorageKey() (string, error) {
}
// CreateSource 只持久化 Save 产生的相对路径,不接受 handler 自行拼接本地路径。
func (s *Service) CreateSource(ownerID uint, project *models.SenlinAgentProject, title string, stored StoredFile) (*models.SenlinAgentSource, error) {
func (s *Service) CreateSource(ownerID uint, project *models.SaProject, title string, stored StoredFile) (*models.SaSource, error) {
title = strings.TrimSpace(title)
if title == "" {
title = stored.OriginalName
@@ -205,7 +205,7 @@ func (s *Service) CreateSource(ownerID uint, project *models.SenlinAgentProject,
if relativePath == "" || filepath.IsAbs(relativePath) {
return nil, ErrSourcePathRequired
}
source := &models.SenlinAgentSource{
source := &models.SaSource{
ProjectID: project.ID, ProjectIdentity: project.Identity, CreatedBy: ownerID,
Kind: "file", Title: title, FilePath: relativePath,
}