feat: add google drive dam foundation
This commit is contained in:
@@ -15,6 +15,7 @@ using Socialize.Api.Modules.Campaigns.Data;
|
||||
using Socialize.Api.Modules.Organizations.Data;
|
||||
using Socialize.Api.Modules.Organizations.Services;
|
||||
using Socialize.Api.Modules.Workspaces.Data;
|
||||
using Socialize.Api.Modules.Workspaces.Services;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
||||
namespace Socialize.Api.Infrastructure.TestData;
|
||||
@@ -261,6 +262,10 @@ internal static class TestDataSeedExtensions
|
||||
}
|
||||
|
||||
organization.Name = "Northstar Agency";
|
||||
organization.IsGoogleDriveDamEnabled = true;
|
||||
organization.GoogleDriveRootFolderId = "dev-socialize-dam-root";
|
||||
organization.GoogleDriveRootFolderName = "Socialize DAM";
|
||||
organization.GoogleDriveRootFolderUrl = "https://drive.google.com/drive/folders/dev-socialize-dam-root";
|
||||
organization.MembershipTierId = OrganizationMembershipTierSeed.AgencyId;
|
||||
organization.OwnerUserId = managerUserId;
|
||||
|
||||
@@ -465,6 +470,7 @@ internal static class TestDataSeedExtensions
|
||||
asset.DisplayName = "Spring launch cut";
|
||||
asset.GoogleDriveFileId = "dev-socialize-demo";
|
||||
asset.GoogleDriveLink = "https://drive.google.com/file/d/dev-socialize-demo/view";
|
||||
asset.GoogleDriveWorkspaceFolderPath = "Socialize DAM/luma-coffee";
|
||||
asset.PreviewUrl = "https://drive.google.com/thumbnail?id=dev-socialize-demo";
|
||||
asset.CurrentRevisionNumber = 2;
|
||||
await dbContext.SaveChangesAsync(cancellationToken);
|
||||
@@ -587,6 +593,7 @@ internal static class TestDataSeedExtensions
|
||||
{
|
||||
Id = id,
|
||||
Name = string.Empty,
|
||||
Slug = string.Empty,
|
||||
TimeZone = string.Empty,
|
||||
CreatedAt = DateTimeOffset.UtcNow,
|
||||
};
|
||||
@@ -594,6 +601,12 @@ internal static class TestDataSeedExtensions
|
||||
}
|
||||
|
||||
workspace.Name = name;
|
||||
workspace.Slug = await WorkspaceSlugGenerator.CreateUniqueAsync(
|
||||
dbContext,
|
||||
organizationId,
|
||||
string.IsNullOrWhiteSpace(workspace.Slug) ? name : workspace.Slug,
|
||||
workspace.Id,
|
||||
cancellationToken);
|
||||
workspace.OrganizationId = organizationId;
|
||||
workspace.OwnerUserId = ownerUserId;
|
||||
workspace.TimeZone = timeZone;
|
||||
|
||||
Reference in New Issue
Block a user