优化结构

This commit is contained in:
Yvan
2026-08-22 12:13:16 +08:00
parent d987244d0e
commit b27a66e9d3
200 changed files with 1794 additions and 1715 deletions
@@ -2,16 +2,15 @@ package system
import (
"context"
"kra/internal/biz/system"
"testing"
"kra/internal/biz"
)
func TestAnnouncementRepositoryKeepsRawIDQuerySemantics(t *testing.T) {
data := newTransactionTestData(t)
repo := &announcementRepo{data: data}
ctx := context.Background()
item := &biz.Announcement{Title: "notice"}
item := &system.Announcement{Title: "notice"}
if err := repo.Create(ctx, item); err != nil {
t.Fatal(err)
}
@@ -44,7 +43,7 @@ func TestAnnouncementRepositoryPreservesSignedUserID(t *testing.T) {
repo := &announcementRepo{data: data}
ctx := context.Background()
userID := -1
item := &biz.Announcement{Title: "notice", UserID: &userID}
item := &system.Announcement{Title: "notice", UserID: &userID}
if err := repo.Create(ctx, item); err != nil {
t.Fatal(err)
}