1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 08:02:49 -05:00

update libs and cleanup

This commit is contained in:
Kyle Spearrin
2017-07-14 09:05:15 -04:00
parent 5786be651e
commit 5a4bfe4e61
24 changed files with 32 additions and 806 deletions

View File

@ -6,7 +6,7 @@ using System.Collections.Generic;
namespace Bit.Core.Models.Table
{
public class Cipher : IDataObject<Guid>
public class Cipher : ITableObject<Guid>
{
private Dictionary<string, CipherAttachment.MetaData> _attachmentData;

View File

@ -3,7 +3,7 @@ using Bit.Core.Utilities;
namespace Bit.Core.Models.Table
{
public class Collection : IDataObject<Guid>
public class Collection : ITableObject<Guid>
{
public Guid Id { get; set; }
public Guid OrganizationId { get; set; }

View File

@ -3,7 +3,7 @@ using Bit.Core.Utilities;
namespace Bit.Core.Models.Table
{
public class Device : IDataObject<Guid>
public class Device : ITableObject<Guid>
{
public Guid Id { get; set; }
public Guid UserId { get; set; }

View File

@ -3,7 +3,7 @@ using Bit.Core.Utilities;
namespace Bit.Core.Models.Table
{
public class Folder : IDataObject<Guid>
public class Folder : ITableObject<Guid>
{
public Guid Id { get; set; }
public Guid UserId { get; set; }

View File

@ -3,7 +3,7 @@ using Bit.Core.Utilities;
namespace Bit.Core.Models.Table
{
public class Group : IDataObject<Guid>
public class Group : ITableObject<Guid>
{
public Guid Id { get; set; }
public Guid OrganizationId { get; set; }

View File

@ -0,0 +1,10 @@
using System;
namespace Bit.Core.Models.Table
{
public interface ITableObject<T> where T : IEquatable<T>
{
T Id { get; set; }
void SetNewId();
}
}

View File

@ -4,7 +4,7 @@ using Bit.Core.Enums;
namespace Bit.Core.Models.Table
{
public class Organization : IDataObject<Guid>, ISubscriber, IStorable, IStorableSubscriber, IRevisable
public class Organization : ITableObject<Guid>, ISubscriber, IStorable, IStorableSubscriber, IRevisable
{
public Guid Id { get; set; }
public string Name { get; set; }

View File

@ -4,7 +4,7 @@ using Bit.Core.Enums;
namespace Bit.Core.Models.Table
{
public class OrganizationUser : IDataObject<Guid>
public class OrganizationUser : ITableObject<Guid>
{
public Guid Id { get; set; }
public Guid OrganizationId { get; set; }

View File

@ -2,7 +2,7 @@
namespace Bit.Core.Models.Table
{
public class U2f : IDataObject<int>
public class U2f : ITableObject<int>
{
public int Id { get; set; }
public Guid UserId { get; set; }

View File

@ -7,7 +7,7 @@ using System.Linq;
namespace Bit.Core.Models.Table
{
public class User : IDataObject<Guid>, ISubscriber, IStorable, IStorableSubscriber, IRevisable
public class User : ITableObject<Guid>, ISubscriber, IStorable, IStorableSubscriber, IRevisable
{
private Dictionary<TwoFactorProviderType, TwoFactorProvider> _twoFactorProviders;