Skip to content
This repository was archived by the owner on Jun 26, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion source/Octopus.Data/Model/IDocument.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

namespace Octopus.Data.Model
{
public interface IDocument : IId, INamed
public interface IDocument : IDocument<string>, IId
{
}

public interface IDocument<out TId> : IId<TId>, INamed
{
}
}
8 changes: 6 additions & 2 deletions source/Octopus.Data/Model/IId.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

namespace Octopus.Data.Model
{
public interface IId
public interface IId : IId<string>
{
string Id { get; }
}

public interface IId<out TId>
{
TId Id { get; }
}
}
3 changes: 2 additions & 1 deletion source/Octopus.Data/Model/User/IUser.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
using System;
using System.Collections.Generic;
using Octopus.Server.MessageContracts.Features.Users;

namespace Octopus.Data.Model.User
{
public interface IUser : IId
public interface IUser : IId<UserId>
{
string Username { get; }
Guid IdentificationToken { get; }
Expand Down
3 changes: 3 additions & 0 deletions source/Octopus.Data/Octopus.Data.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@
<LangVersion>default</LangVersion>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Nullable>enable</Nullable>
<LangVersion>8</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Octopus.Server.MessageContracts" Version="0.1.291-enh-asymetry" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion source/Octopus.Data/Storage/User/IUserStore.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using System;
using Octopus.Data.Model.User;
using Octopus.Server.MessageContracts.Features.Users;

namespace Octopus.Data.Storage.User
{
public interface IUserStore
{
IUser GetById(string userId);
IUser GetById(UserId userId);
IUser GetByUsername(string username);
IUser[] GetByEmailAddress(string emailAddress);
IUser GetByIdentificationToken(Guid identificationToken);
Expand Down