Refactor domain layer.

pull/441/head
Halil ibrahim Kalkan 6 years ago
parent 4c7e397e36
commit 3656f87d35

@ -12,7 +12,7 @@ namespace Volo.Docs.Documents
{ {
public class GithubDocumentStore : IDocumentStore, ITransientDependency public class GithubDocumentStore : IDocumentStore, ITransientDependency
{ {
public const string Type = "Github"; public const string Type = "Github"; //TODO: Conver to "github"
public async Task<Document> FindDocumentByNameAsync(Project project, string documentName, string version) public async Task<Document> FindDocumentByNameAsync(Project project, string documentName, string version)
{ {

@ -6,6 +6,5 @@
public const int MaxShortNameLength = 32; public const int MaxShortNameLength = 32;
public const int MaxDefaultDocumentNameLength = 128; public const int MaxDefaultDocumentNameLength = 128;
public const int MaxNavigationDocumentNameLength = 128; public const int MaxNavigationDocumentNameLength = 128;
public static int MaxOrganizationLength = 128;
} }
} }

@ -3,6 +3,7 @@
public static class DocsConsts public static class DocsConsts
{ {
public const string DefaultDbTablePrefix = "Docs"; public const string DefaultDbTablePrefix = "Docs";
public const string DefaultDbSchema = null; public const string DefaultDbSchema = null;
} }
} }

@ -5,7 +5,8 @@ namespace Volo.Docs
{ {
[DependsOn( [DependsOn(
typeof(DocsDomainSharedModule), typeof(DocsDomainSharedModule),
typeof(AbpDddDomainModule))] typeof(AbpDddDomainModule)
)]
public class DocsDomainModule : AbpModule public class DocsDomainModule : AbpModule
{ {

@ -9,25 +9,43 @@ namespace Volo.Docs.Projects
{ {
public class Project : AggregateRoot<Guid>, IHasExtraProperties public class Project : AggregateRoot<Guid>, IHasExtraProperties
{ {
/// <summary>
/// Name of the project for display purposes.
/// </summary>
public virtual string Name { get; protected set; } public virtual string Name { get; protected set; }
/// <summary>
/// A short name of the project to be seen in URLs.
/// </summary>
public virtual string ShortName { get; protected set; } public virtual string ShortName { get; protected set; }
/// <summary>
/// The format of the document (e.g. "md" for Markdown, "html" for HTML).
/// </summary>
public virtual string Format { get; protected set; } public virtual string Format { get; protected set; }
/// <summary>
/// The document for the initial page.
/// </summary>
public virtual string DefaultDocumentName { get; protected set; } public virtual string DefaultDocumentName { get; protected set; }
/// <summary>
/// The document to be used for the navigation menu (index).
/// </summary>
public virtual string NavigationDocumentName { get; protected set; } public virtual string NavigationDocumentName { get; protected set; }
/// <summary>
/// The source of the documents (e.g. Github).
/// </summary>
public virtual string DocumentStoreType { get; protected set; } public virtual string DocumentStoreType { get; protected set; }
public virtual string GoogleCustomSearchId { get; set; } public virtual string GoogleCustomSearchId { get; set; }
public Dictionary<string, object> ExtraProperties { get; protected set; } public virtual Dictionary<string, object> ExtraProperties { get; protected set; }
protected Project() protected Project()
{ {
ExtraProperties = new Dictionary<string, object>(); //TODO: Needed (by mongodb)..? ExtraProperties = new Dictionary<string, object>();
} }
public Project(Guid id, [NotNull] string name, [NotNull] string shortName, [NotNull] string defaultDocumentName, [NotNull] string navigationDocumentName, string googleCustomSearchId) public Project(Guid id, [NotNull] string name, [NotNull] string shortName, [NotNull] string defaultDocumentName, [NotNull] string navigationDocumentName, string googleCustomSearchId)

Loading…
Cancel
Save