V 1.1.2 新增了生图包 以及各种转发和接口

This commit is contained in:
2025-06-14 22:12:37 +08:00
parent c07369c297
commit 3514cf53f8
42 changed files with 3971 additions and 74 deletions
+41
View File
@@ -0,0 +1,41 @@
using LMS.Repository.MJPackage;
using System.ComponentModel.DataAnnotations;
namespace LMS.Repository.DB
{
public class MJApiTasks
{
[Key]
public string TaskId { get; set; }
public string Token { get; set; }
public long TokenId { get; set; }
public DateTime StartTime { get; set; }
public DateTime? EndTime { get; set; }
public string Status { get; set; }
public string ThirdPartyTaskId { get; set; } // 第三方任务ID
public string? Properties { get; set; }
}
public class MJApiTaskCollection : MJApiTasks
{
public long TokenId { get; set; }
public string Token { get; set; }
}
public class MJTaskStatus
{
public const string NOT_START = "NOT_START";
public const string SUBMITTED = "SUBMITTED";
public const string IN_PROGRESS = "IN_PROGRESS";
public const string FAILURE = "FAILURE";
public const string SUCCESS = "SUCCESS";
public const string MODAL = "MODAL";
public const string CANCEL = "CANCEL";
}
}
+22
View File
@@ -0,0 +1,22 @@
using LMS.Common.Extensions;
using System.ComponentModel.DataAnnotations;
namespace LMS.Repository.DB
{
public class MJApiTokenUsage
{
[Key]
public long TokenId { get; set; }
[Key]
public DateTime Date { get; set; }
public int DailyUsage { get; set; } = 0;
public int TotalUsage { get; set; } = 0;
public DateTime LastActivityAt { get; set; } = BeijingTimeExtension.GetBeijingTime();
public string? HistoryUse { get; set; } = null;
}
}
+29
View File
@@ -0,0 +1,29 @@
using LMS.Common.Extensions;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace LMS.Repository.DB
{
public class MJApiTokens
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
[Required]
[StringLength(64)]
public required string Token { get; set; }
[Required]
public required string UseToken { get; set; } // 实际使用的Token
public int DailyLimit { get; set; } = 0;
public int TotalLimit { get; set; } = 0;
public int ConcurrencyLimit { get; set; } = 1;
public DateTime CreatedAt { get; set; } = BeijingTimeExtension.GetBeijingTime();
public DateTime? ExpiresAt { get; set; }
}
}