24 changed files with 423 additions and 41 deletions
@ -0,0 +1,19 @@ |
|||
namespace LINGYUN.Abp.BackgroundTasks; |
|||
/// <summary>
|
|||
/// 作业来源
|
|||
/// </summary>
|
|||
public enum JobSource |
|||
{ |
|||
/// <summary>
|
|||
/// 未定义
|
|||
/// </summary>
|
|||
None = -1, |
|||
/// <summary>
|
|||
/// 用户
|
|||
/// </summary>
|
|||
User = 0, |
|||
/// <summary>
|
|||
/// 系统内置
|
|||
/// </summary>
|
|||
System = 10, |
|||
} |
|||
@ -0,0 +1,208 @@ |
|||
// <auto-generated />
|
|||
using System; |
|||
using LY.MicroService.TaskManagement.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
|
|||
#nullable disable |
|||
|
|||
namespace LY.MicroService.TaskManagement.Migrations |
|||
{ |
|||
[DbContext(typeof(TaskManagementMigrationsDbContext))] |
|||
[Migration("20220330013146_Add-Field-Source-With-BackgroundJobInfo")] |
|||
partial class AddFieldSourceWithBackgroundJobInfo |
|||
{ |
|||
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
|||
{ |
|||
#pragma warning disable 612, 618
|
|||
modelBuilder |
|||
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) |
|||
.HasAnnotation("ProductVersion", "6.0.3") |
|||
.HasAnnotation("Relational:MaxIdentifierLength", 64); |
|||
|
|||
modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobInfo", b => |
|||
{ |
|||
b.Property<string>("Id") |
|||
.HasColumnType("varchar(255)"); |
|||
|
|||
b.Property<string>("Args") |
|||
.HasColumnType("longtext") |
|||
.HasColumnName("Args"); |
|||
|
|||
b.Property<DateTime>("BeginTime") |
|||
.HasColumnType("datetime(6)"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("varchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime(6)") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid?>("CreatorId") |
|||
.HasColumnType("char(36)") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<string>("Cron") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("varchar(50)") |
|||
.HasColumnName("Cron"); |
|||
|
|||
b.Property<string>("Description") |
|||
.HasMaxLength(255) |
|||
.HasColumnType("varchar(255)") |
|||
.HasColumnName("Description"); |
|||
|
|||
b.Property<DateTime?>("EndTime") |
|||
.HasColumnType("datetime(6)"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("longtext") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("Group") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("varchar(50)") |
|||
.HasColumnName("Group"); |
|||
|
|||
b.Property<int>("Interval") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<bool>("IsAbandoned") |
|||
.HasColumnType("tinyint(1)"); |
|||
|
|||
b.Property<bool>("IsEnabled") |
|||
.HasColumnType("tinyint(1)"); |
|||
|
|||
b.Property<int>("JobType") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<DateTime?>("LastModificationTime") |
|||
.HasColumnType("datetime(6)") |
|||
.HasColumnName("LastModificationTime"); |
|||
|
|||
b.Property<Guid?>("LastModifierId") |
|||
.HasColumnType("char(36)") |
|||
.HasColumnName("LastModifierId"); |
|||
|
|||
b.Property<DateTime?>("LastRunTime") |
|||
.HasColumnType("datetime(6)"); |
|||
|
|||
b.Property<int>("LockTimeOut") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<int>("MaxCount") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<int>("MaxTryCount") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(100) |
|||
.HasColumnType("varchar(100)") |
|||
.HasColumnName("Name"); |
|||
|
|||
b.Property<DateTime?>("NextRunTime") |
|||
.HasColumnType("datetime(6)"); |
|||
|
|||
b.Property<int>("Priority") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<string>("Result") |
|||
.HasMaxLength(1000) |
|||
.HasColumnType("varchar(1000)") |
|||
.HasColumnName("Result"); |
|||
|
|||
b.Property<int>("Source") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("int") |
|||
.HasDefaultValue(-1) |
|||
.HasColumnName("Source"); |
|||
|
|||
b.Property<int>("Status") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("char(36)") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.Property<int>("TriggerCount") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<int>("TryCount") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<string>("Type") |
|||
.IsRequired() |
|||
.HasMaxLength(1000) |
|||
.HasColumnType("varchar(1000)") |
|||
.HasColumnName("Type"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Name", "Group"); |
|||
|
|||
b.ToTable("TK_BackgroundJobs", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobLog", b => |
|||
{ |
|||
b.Property<long>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bigint"); |
|||
|
|||
b.Property<string>("Exception") |
|||
.HasMaxLength(2000) |
|||
.HasColumnType("varchar(2000)") |
|||
.HasColumnName("Exception"); |
|||
|
|||
b.Property<string>("JobGroup") |
|||
.HasMaxLength(50) |
|||
.HasColumnType("varchar(50)") |
|||
.HasColumnName("JobGroup"); |
|||
|
|||
b.Property<string>("JobId") |
|||
.HasMaxLength(255) |
|||
.HasColumnType("varchar(255)") |
|||
.HasColumnName("JobId"); |
|||
|
|||
b.Property<string>("JobName") |
|||
.HasMaxLength(100) |
|||
.HasColumnType("varchar(100)") |
|||
.HasColumnName("JobName"); |
|||
|
|||
b.Property<string>("JobType") |
|||
.HasMaxLength(1000) |
|||
.HasColumnType("varchar(1000)") |
|||
.HasColumnName("JobType"); |
|||
|
|||
b.Property<string>("Message") |
|||
.HasMaxLength(1000) |
|||
.HasColumnType("varchar(1000)") |
|||
.HasColumnName("Message"); |
|||
|
|||
b.Property<DateTime>("RunTime") |
|||
.HasColumnType("datetime(6)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("char(36)") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("JobGroup", "JobName"); |
|||
|
|||
b.ToTable("TK_BackgroundJobLogs", (string)null); |
|||
}); |
|||
#pragma warning restore 612, 618
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,26 @@ |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
#nullable disable |
|||
|
|||
namespace LY.MicroService.TaskManagement.Migrations |
|||
{ |
|||
public partial class AddFieldSourceWithBackgroundJobInfo : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.AddColumn<int>( |
|||
name: "Source", |
|||
table: "TK_BackgroundJobs", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: -1); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropColumn( |
|||
name: "Source", |
|||
table: "TK_BackgroundJobs"); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue