namespace ECPDAL.Collaboration.DTOs;
///
/// A single provider's connect state for one space, in TCOLLABORATIONSPACEINTEGRATION. Mock
/// only per the ECP preview's explicit scope note — no real OAuth flow, just a persisted on/off
/// flag per (space, provider) pair.
///
/// DDL: C:\Scripts\ECP\COLLABORATION.txt (not yet applied to the live schema — run it, and
/// register the COLLABORATIONSPACEINTEGRATION AutoNumber series per that file's closing note,
/// before using this endpoint).
///
public class CollaborationSpaceIntegrationDTO
{
public int CollaborationSpaceIntegrationId { get; set; }
public int CollaborationSpaceId { get; set; }
public string Provider { get; set; } = string.Empty;
public bool Connected { get; set; }
public int TenantId { get; set; } = -1;
public string DatabaseName { get; set; } = string.Empty;
public byte DatabaseType { get; set; }
public short Version { get; set; }
public byte Status { get; set; } = 1; // 1=Active 2=Deleted
public int CreatedById { get; set; } = -1;
public DateTime CreatedOn { get; set; }
public int ModifiedById { get; set; } = -1;
public DateTime ModifiedOn { get; set; }
}
/// Input for SaveCollaborationSpaceIntegration — toggles a single provider's connect
/// state for a space. Upserts (creates the row on first toggle, since most spaces start with
/// none configured).
public class SaveCollaborationSpaceIntegrationDTO
{
public int CollaborationSpaceId { get; set; }
public string Provider { get; set; } = string.Empty;
public bool Connected { get; set; }
}