using Connected.Data;
namespace Common.Documents
{
///
/// Represents the base entity for all documents.
///
///
/// Document is primary entity of the business processes. It provides
/// schema which is used in a business process lifecycle. Documents, apart from
/// some basic validation, do not provide any specifiec business logic. Business
/// processes are entirely responsible for the business logic.
///
public interface IDocument : IPrimaryKey
where TPrimaryKey : notnull
{
///
/// The date when document was created.
///
DateTimeOffset Created { get; init; }
///
/// The date when document was last updated.
///
DateTimeOffset? Modified { get; init; }
///
/// The unique identifier of the document. This is
/// usually set by a customer specific numbering system.
///
string? Code { get; init; }
///
/// The user which created the document. Can be null if document was created by the system.
///
int? Author { get; init; }
///
/// The user last modified the document. Once user modifies the document it becomes the Owner.
///
///
/// This behavior could be overriden in documents implementation.
///
int? Owner { get; init; }
}
}