mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 23:52:50 -05:00
[SG-998] Move files to Vault folders (#2724)
* Move Api files * Move Core files * Move Infrastructure files * Move Sql Files * Move Api Sync files to Vault * Move test vault files * Update Sql.sqlproj paths * Update Codeowners * Fix vault file paths in sqlproj * Update CipherDetails.sql path in sqlproj * Update Core models and entities namespaces * Update namespaces Core Services and Repositories * Missed service namespaces * Update Api namespaces * Update Infrastructure namespaces * Move infrastructure queries that were missed * Tests namespace updates * Admin and Events namespace updates * Remove unused usings * Remove extra CiphersController usings * Rename folder * Fix CipherDetails namespace * Sqlproj fixes * Move stored procs into folders by table * using order fix
This commit is contained in:
@ -1,11 +0,0 @@
|
||||
using Bit.Core.Entities;
|
||||
|
||||
namespace Bit.Core.Models.Data;
|
||||
|
||||
public class AttachmentResponseData
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public CipherAttachment.MetaData Data { get; set; }
|
||||
public Cipher Cipher { get; set; }
|
||||
public string Url { get; set; }
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Bit.Core.Models.Data;
|
||||
|
||||
public class CipherAttachment
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid? UserId { get; set; }
|
||||
public Guid? OrganizationId { get; set; }
|
||||
public string AttachmentId { get; set; }
|
||||
public string AttachmentData { get; set; }
|
||||
|
||||
public class MetaData
|
||||
{
|
||||
private long _size;
|
||||
|
||||
// We serialize Size as a string since JSON (or Javascript) doesn't support full precision for long numbers
|
||||
[JsonNumberHandling(JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString)]
|
||||
public long Size
|
||||
{
|
||||
get { return _size; }
|
||||
set { _size = value; }
|
||||
}
|
||||
|
||||
public string FileName { get; set; }
|
||||
public string Key { get; set; }
|
||||
|
||||
public string ContainerName { get; set; } = "attachments";
|
||||
public bool Validated { get; set; } = true;
|
||||
|
||||
// This is stored alongside metadata as an identifier. It does not need repeating in serialization
|
||||
[JsonIgnore]
|
||||
public string AttachmentId { get; set; }
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
namespace Bit.Core.Models.Data;
|
||||
|
||||
public class CipherCardData : CipherData
|
||||
{
|
||||
public CipherCardData() { }
|
||||
|
||||
public string CardholderName { get; set; }
|
||||
public string Brand { get; set; }
|
||||
public string Number { get; set; }
|
||||
public string ExpMonth { get; set; }
|
||||
public string ExpYear { get; set; }
|
||||
public string Code { get; set; }
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
namespace Bit.Core.Models.Data;
|
||||
|
||||
public abstract class CipherData
|
||||
{
|
||||
public CipherData() { }
|
||||
|
||||
public string Name { get; set; }
|
||||
public string Notes { get; set; }
|
||||
public IEnumerable<CipherFieldData> Fields { get; set; }
|
||||
public IEnumerable<CipherPasswordHistoryData> PasswordHistory { get; set; }
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
namespace Core.Models.Data;
|
||||
|
||||
public class CipherDetails : CipherOrganizationDetails
|
||||
{
|
||||
public Guid? FolderId { get; set; }
|
||||
public bool Favorite { get; set; }
|
||||
public bool Edit { get; set; }
|
||||
public bool ViewPassword { get; set; }
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
using Bit.Core.Enums;
|
||||
|
||||
namespace Bit.Core.Models.Data;
|
||||
|
||||
public class CipherFieldData
|
||||
{
|
||||
public CipherFieldData() { }
|
||||
|
||||
public FieldType Type { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Value { get; set; }
|
||||
public int? LinkedId { get; set; }
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
namespace Bit.Core.Models.Data;
|
||||
|
||||
public class CipherIdentityData : CipherData
|
||||
{
|
||||
public CipherIdentityData() { }
|
||||
|
||||
public string Title { get; set; }
|
||||
public string FirstName { get; set; }
|
||||
public string MiddleName { get; set; }
|
||||
public string LastName { get; set; }
|
||||
public string Address1 { get; set; }
|
||||
public string Address2 { get; set; }
|
||||
public string Address3 { get; set; }
|
||||
public string City { get; set; }
|
||||
public string State { get; set; }
|
||||
public string PostalCode { get; set; }
|
||||
public string Country { get; set; }
|
||||
public string Company { get; set; }
|
||||
public string Email { get; set; }
|
||||
public string Phone { get; set; }
|
||||
public string SSN { get; set; }
|
||||
public string Username { get; set; }
|
||||
public string PassportNumber { get; set; }
|
||||
public string LicenseNumber { get; set; }
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
using Bit.Core.Enums;
|
||||
|
||||
namespace Bit.Core.Models.Data;
|
||||
|
||||
public class CipherLoginData : CipherData
|
||||
{
|
||||
private string _uri;
|
||||
|
||||
public CipherLoginData() { }
|
||||
|
||||
public string Uri
|
||||
{
|
||||
get => Uris?.FirstOrDefault()?.Uri ?? _uri;
|
||||
set { _uri = value; }
|
||||
}
|
||||
public IEnumerable<CipherLoginUriData> Uris { get; set; }
|
||||
public string Username { get; set; }
|
||||
public string Password { get; set; }
|
||||
public DateTime? PasswordRevisionDate { get; set; }
|
||||
public string Totp { get; set; }
|
||||
public bool? AutofillOnPageLoad { get; set; }
|
||||
|
||||
public class CipherLoginUriData
|
||||
{
|
||||
public CipherLoginUriData() { }
|
||||
|
||||
public string Uri { get; set; }
|
||||
public UriMatchType? Match { get; set; } = null;
|
||||
}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
using Bit.Core.Entities;
|
||||
|
||||
namespace Core.Models.Data;
|
||||
|
||||
public class CipherOrganizationDetails : Cipher
|
||||
{
|
||||
public bool OrganizationUseTotp { get; set; }
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
namespace Bit.Core.Models.Data;
|
||||
|
||||
public class CipherPasswordHistoryData
|
||||
{
|
||||
public CipherPasswordHistoryData() { }
|
||||
|
||||
public string Password { get; set; }
|
||||
public DateTime LastUsedDate { get; set; }
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
using Bit.Core.Enums;
|
||||
|
||||
namespace Bit.Core.Models.Data;
|
||||
|
||||
public class CipherSecureNoteData : CipherData
|
||||
{
|
||||
public CipherSecureNoteData() { }
|
||||
|
||||
public SecureNoteType Type { get; set; }
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
using Bit.Core.Entities;
|
||||
using Core.Models.Data;
|
||||
using Bit.Core.Vault.Models.Data;
|
||||
|
||||
namespace Bit.Core.Models.Data;
|
||||
|
||||
|
Reference in New Issue
Block a user