- 共通クラス(CmnDB, CmnDefine, CmnUtil, LogManager, FlareSolverrFeedManager)を Class/Common フォルダへ移動 - 各フィード生成クラスを接続先ドメインごとのフォルダ(YouTube, Pixiv, X, Danbooru, EHentai, HitomiLa, SpankBang, CiEn, MissAV, MissAV123, Momonga, AuraHentai, Javtwi, KimochiInfo, Mangalear, YahooBaseball)へ移動 - 旧 Class/RSS フォルダを廃止 - フォルダ構成に合わせて各クラスの名前空間(namespace)と using 参照を更新 - Program.cs の using および呼び出し参照を新しい名前空間に更新 - rss-generator.csproj の不要な Folder 要素をクリーンアップ
91 lines
2.4 KiB
C#
91 lines
2.4 KiB
C#
using System;
|
||
using System.Collections.Generic;
|
||
using System.Text;
|
||
|
||
namespace rss_generator.Class.Common;
|
||
|
||
internal class CmnDefine
|
||
{
|
||
public class ArmonicaFeed
|
||
{
|
||
public int Id { get; set; }
|
||
|
||
public string Url { get; set; } = string.Empty;
|
||
|
||
// smallintはC#のshort(Int16)に対応
|
||
public short Kind { get; set; }
|
||
|
||
public int Category { get; set; }
|
||
|
||
public string Name { get; set; } = string.Empty;
|
||
|
||
// NULL許容型(Nullable)
|
||
public string? Website { get; set; }
|
||
|
||
public string? Description { get; set; }
|
||
|
||
// bigintはC#のlong(Int64)に対応
|
||
// SQL側がダブルクォーテーションで囲まれているため、
|
||
// Dapperの自動マッピングを効かせるためにプロパティ名も大文字小文字を合わせます
|
||
public long LastUpdate { get; set; }
|
||
|
||
public short Priority { get; set; }
|
||
|
||
public string? PathEntries { get; set; }
|
||
|
||
public string? HttpAuth { get; set; }
|
||
|
||
public short Error { get; set; }
|
||
|
||
public int Ttl { get; set; }
|
||
|
||
public string? Attributes { get; set; }
|
||
|
||
public int CacheNbEntries { get; set; }
|
||
|
||
public int CacheNbUnreads { get; set; }
|
||
}
|
||
|
||
public class ArmonicaEntry
|
||
{
|
||
// bigintはC#のlong(Int64)に対応
|
||
public long Id { get; set; }
|
||
|
||
// not nullカラムは string.Empty で初期化
|
||
public string Guid { get; set; } = string.Empty;
|
||
|
||
public string Title { get; set; } = string.Empty;
|
||
|
||
// NULL許容カラムは string? (Nullable)
|
||
public string? Author { get; set; }
|
||
|
||
public string? Content { get; set; }
|
||
|
||
public string LinK { get; set; } = string.Empty;
|
||
|
||
// NULL許容のbigintは long? に対応
|
||
public long? Date { get; set; }
|
||
|
||
public long LastSeen { get; set; }
|
||
|
||
public long LastUserModified { get; set; }
|
||
|
||
// bytea(バイナリデータ)は byte[] にマッピングされます
|
||
public byte[]? Hash { get; set; }
|
||
|
||
// smallintは short(Int16) に対応
|
||
public short IsRead { get; set; }
|
||
|
||
public short IsFavorite { get; set; }
|
||
|
||
// NULL許容のintegerは int? に対応
|
||
public int? IdFeed { get; set; }
|
||
|
||
public string? Tags { get; set; }
|
||
|
||
public string? Attributes { get; set; }
|
||
|
||
public long? LastModified { get; set; }
|
||
}
|
||
}
|