55 lines
1.8 KiB
C#
55 lines
1.8 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace TriliumMind.Models;
|
|
|
|
public class AppSettings
|
|
{
|
|
public Trilium Trilium { get; set; } = new Trilium();
|
|
public Jira Jira { get; set; } = new Jira();
|
|
public Database Database { get; set; } = new Database();
|
|
}
|
|
|
|
public class Trilium
|
|
{
|
|
public string EtapiToken { get; set; } = string.Empty;
|
|
public string EtapiBaseUrl { get; set; } = "https://localhost/etapi";
|
|
public string JiraOpenedIssuePageId = string.Empty;
|
|
public string JiraWorkingIssuePageId = string.Empty;
|
|
public string JiraResolvedIssuePageId = string.Empty;
|
|
public string DividendPageId { get; set; } = String.Empty;
|
|
}
|
|
|
|
public class Jira
|
|
{
|
|
public string BaseUrl { get; set; } = string.Empty;
|
|
public string ApiBaseUrl { get; set; } = string.Empty;
|
|
public string AccessToken { get; set; } = string.Empty;
|
|
public List<string> TargetProjects { get; set; } = [];
|
|
public DateTime LastFetchDateTime { get; set; } = DateTime.Parse("2025-12-01T00:00:00Z");
|
|
public int FetchInterval { get; set; } = 60;
|
|
public string SearchFields { get; set; } = string.Empty;
|
|
}
|
|
|
|
public class Database
|
|
{
|
|
public string Type { get; set; } = "Sqlite"; // "Sqlite" or "Postgres"
|
|
public SqliteConfig Sqlite { get; set; } = new SqliteConfig();
|
|
public PostgresConfig Postgres { get; set; } = new PostgresConfig();
|
|
}
|
|
|
|
public class SqliteConfig
|
|
{
|
|
public string DatabaseFilePath { get; set; } = "TriliumMind.db";
|
|
}
|
|
|
|
public class PostgresConfig
|
|
{
|
|
public string Host { get; set; } = "localhost";
|
|
public int Port { get; set; } = 5432;
|
|
public string Database { get; set; } = "TriliumMind";
|
|
public string Username { get; set; } = string.Empty;
|
|
public string Password { get; set; } = string.Empty;
|
|
public string SslCertificatePath { get; set; } = string.Empty;
|
|
} |