mirror of
https://github.com/bitwarden/server
synced 2026-01-06 02:23:51 +00:00
Split out repositories to Infrastructure.Dapper / EntityFramework (#1759)
This commit is contained in:
31
src/Core/Entities/SsoConfig.cs
Normal file
31
src/Core/Entities/SsoConfig.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using Bit.Core.Models.Data;
|
||||
|
||||
namespace Bit.Core.Entities
|
||||
{
|
||||
public class SsoConfig : ITableObject<long>
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public bool Enabled { get; set; } = true;
|
||||
public Guid OrganizationId { get; set; }
|
||||
public string Data { get; set; }
|
||||
public DateTime CreationDate { get; internal set; } = DateTime.UtcNow;
|
||||
public DateTime RevisionDate { get; internal set; } = DateTime.UtcNow;
|
||||
|
||||
public void SetNewId()
|
||||
{
|
||||
// int will be auto-populated
|
||||
Id = 0;
|
||||
}
|
||||
|
||||
public SsoConfigurationData GetData()
|
||||
{
|
||||
return SsoConfigurationData.Deserialize(Data);
|
||||
}
|
||||
|
||||
public void SetData(SsoConfigurationData data)
|
||||
{
|
||||
Data = data.Serialize();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user