refactor(documents): rename document owner fields
This commit is contained in:
@@ -116,7 +116,7 @@ func createPostgresSearchDocument(
|
||||
t.Helper()
|
||||
document.ProjectID = project.ID
|
||||
document.ProjectIdentity = project.Identity
|
||||
document.CreatedBy = ownerID
|
||||
document.OwnerID = ownerID
|
||||
document.Kind = models.DocumentKindFile
|
||||
document.Extension = ".md"
|
||||
document.MimeType = "text/markdown; charset=utf-8"
|
||||
|
||||
@@ -55,7 +55,7 @@ func TestSearchAppliesStableFairGlobalLimitAcrossResultTypes(t *testing.T) {
|
||||
document := models.SaDocumentTree{
|
||||
Identity: fmt.Sprintf("00000000-0000-7003-8000-%012d", index),
|
||||
ProjectID: project.ID,
|
||||
CreatedBy: 7,
|
||||
OwnerID: 7,
|
||||
Kind: models.DocumentKindFile,
|
||||
Name: fmt.Sprintf("稳定排序文档 %02d.md", index),
|
||||
NormalizedName: fmt.Sprintf("稳定排序文档 %02d.md", index),
|
||||
@@ -139,7 +139,7 @@ func TestSearchOnlyReturnsNavigableProjectTaskAndDocumentResults(t *testing.T) {
|
||||
func createSearchDocument(t *testing.T, database *gorm.DB, projectID, userID uint, name, markdown, identity string, updatedAt time.Time) models.SaDocumentTree {
|
||||
t.Helper()
|
||||
document := models.SaDocumentTree{
|
||||
Identity: identity, ProjectID: projectID, CreatedBy: userID, Kind: models.DocumentKindFile,
|
||||
Identity: identity, ProjectID: projectID, OwnerID: userID, Kind: models.DocumentKindFile,
|
||||
Name: name, NormalizedName: strings.ToLower(name), Extension: ".md",
|
||||
MimeType: "text/markdown", Size: int64(len([]byte(markdown))), Revision: 1,
|
||||
UpdatedAt: updatedAt,
|
||||
|
||||
Reference in New Issue
Block a user