23 changed files with 632 additions and 91 deletions
@ -1,9 +1,8 @@ |
|||||
namespace LINGYUN.Abp.TextTemplating; |
namespace LINGYUN.Abp.TextTemplating; |
||||
|
|
||||
public class TextTemplateDto |
public class TextTemplateContentDto |
||||
{ |
{ |
||||
public string Name { get; set; } |
public string Name { get; set; } |
||||
public string DisplayName { get; set; } |
|
||||
public string Content { get; set; } |
public string Content { get; set; } |
||||
public string Culture { get; set; } |
public string Culture { get; set; } |
||||
} |
} |
||||
@ -0,0 +1,14 @@ |
|||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using Volo.Abp.Validation; |
||||
|
|
||||
|
namespace LINGYUN.Abp.TextTemplating; |
||||
|
|
||||
|
public class TextTemplateContentGetInput |
||||
|
{ |
||||
|
[Required] |
||||
|
[DynamicStringLength(typeof(TextTemplateConsts), nameof(TextTemplateConsts.MaxNameLength))] |
||||
|
public string Name { get; set; } |
||||
|
|
||||
|
[DynamicStringLength(typeof(TextTemplateConsts), nameof(TextTemplateConsts.MaxCultureLength))] |
||||
|
public string Culture { get; set; } |
||||
|
} |
||||
@ -0,0 +1,11 @@ |
|||||
|
namespace LINGYUN.Abp.TextTemplating; |
||||
|
|
||||
|
public class TextTemplateDefinitionDto |
||||
|
{ |
||||
|
public string Name { get; set; } |
||||
|
public string DisplayName { get; set; } |
||||
|
public string DefaultCultureName { get; set; } |
||||
|
public bool IsInlineLocalized { get; set; } |
||||
|
public bool IsLayout { get; set; } |
||||
|
public string Layout { get; set; } |
||||
|
} |
||||
@ -0,0 +1,8 @@ |
|||||
|
using Volo.Abp.Application.Dtos; |
||||
|
|
||||
|
namespace LINGYUN.Abp.TextTemplating; |
||||
|
|
||||
|
public class TextTemplateDefinitionGetListInput : PagedAndSortedResultRequestDto |
||||
|
{ |
||||
|
public string Filter { get; set; } |
||||
|
} |
||||
@ -0,0 +1,353 @@ |
|||||
|
// <auto-generated />
|
||||
|
using System; |
||||
|
using LY.MicroService.BackendAdmin.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.BackendAdmin.Migrations |
||||
|
{ |
||||
|
[DbContext(typeof(BackendAdminMigrationsDbContext))] |
||||
|
[Migration("20220628050554_Alter-Culture-Field-Allow-Be-Null")] |
||||
|
partial class AlterCultureFieldAllowBeNull |
||||
|
{ |
||||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
||||
|
{ |
||||
|
#pragma warning disable 612, 618
|
||||
|
modelBuilder |
||||
|
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) |
||||
|
.HasAnnotation("ProductVersion", "6.0.6") |
||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 64); |
||||
|
|
||||
|
modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => |
||||
|
{ |
||||
|
b.Property<Guid>("Id") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
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<Guid?>("DeleterId") |
||||
|
.HasColumnType("char(36)") |
||||
|
.HasColumnName("DeleterId"); |
||||
|
|
||||
|
b.Property<DateTime?>("DeletionTime") |
||||
|
.HasColumnType("datetime(6)") |
||||
|
.HasColumnName("DeletionTime"); |
||||
|
|
||||
|
b.Property<string>("DisplayName") |
||||
|
.IsRequired() |
||||
|
.HasMaxLength(64) |
||||
|
.HasColumnType("varchar(64)"); |
||||
|
|
||||
|
b.Property<string>("ExtraProperties") |
||||
|
.HasColumnType("longtext") |
||||
|
.HasColumnName("ExtraProperties"); |
||||
|
|
||||
|
b.Property<bool>("IsDeleted") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnType("tinyint(1)") |
||||
|
.HasDefaultValue(false) |
||||
|
.HasColumnName("IsDeleted"); |
||||
|
|
||||
|
b.Property<DateTime?>("LastModificationTime") |
||||
|
.HasColumnType("datetime(6)") |
||||
|
.HasColumnName("LastModificationTime"); |
||||
|
|
||||
|
b.Property<Guid?>("LastModifierId") |
||||
|
.HasColumnType("char(36)") |
||||
|
.HasColumnName("LastModifierId"); |
||||
|
|
||||
|
b.HasKey("Id"); |
||||
|
|
||||
|
b.HasIndex("DisplayName"); |
||||
|
|
||||
|
b.ToTable("AbpEditions", (string)null); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => |
||||
|
{ |
||||
|
b.Property<Guid>("Id") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
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<Guid?>("DeleterId") |
||||
|
.HasColumnType("char(36)") |
||||
|
.HasColumnName("DeleterId"); |
||||
|
|
||||
|
b.Property<DateTime?>("DeletionTime") |
||||
|
.HasColumnType("datetime(6)") |
||||
|
.HasColumnName("DeletionTime"); |
||||
|
|
||||
|
b.Property<DateTime?>("DisableTime") |
||||
|
.HasColumnType("datetime(6)"); |
||||
|
|
||||
|
b.Property<Guid?>("EditionId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<DateTime?>("EnableTime") |
||||
|
.HasColumnType("datetime(6)"); |
||||
|
|
||||
|
b.Property<string>("ExtraProperties") |
||||
|
.HasColumnType("longtext") |
||||
|
.HasColumnName("ExtraProperties"); |
||||
|
|
||||
|
b.Property<bool>("IsActive") |
||||
|
.HasColumnType("tinyint(1)"); |
||||
|
|
||||
|
b.Property<bool>("IsDeleted") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnType("tinyint(1)") |
||||
|
.HasDefaultValue(false) |
||||
|
.HasColumnName("IsDeleted"); |
||||
|
|
||||
|
b.Property<DateTime?>("LastModificationTime") |
||||
|
.HasColumnType("datetime(6)") |
||||
|
.HasColumnName("LastModificationTime"); |
||||
|
|
||||
|
b.Property<Guid?>("LastModifierId") |
||||
|
.HasColumnType("char(36)") |
||||
|
.HasColumnName("LastModifierId"); |
||||
|
|
||||
|
b.Property<string>("Name") |
||||
|
.IsRequired() |
||||
|
.HasMaxLength(64) |
||||
|
.HasColumnType("varchar(64)"); |
||||
|
|
||||
|
b.HasKey("Id"); |
||||
|
|
||||
|
b.HasIndex("EditionId"); |
||||
|
|
||||
|
b.HasIndex("Name"); |
||||
|
|
||||
|
b.ToTable("AbpTenants", (string)null); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => |
||||
|
{ |
||||
|
b.Property<Guid>("TenantId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<string>("Name") |
||||
|
.HasMaxLength(64) |
||||
|
.HasColumnType("varchar(64)"); |
||||
|
|
||||
|
b.Property<string>("Value") |
||||
|
.IsRequired() |
||||
|
.HasMaxLength(1024) |
||||
|
.HasColumnType("varchar(1024)"); |
||||
|
|
||||
|
b.HasKey("TenantId", "Name"); |
||||
|
|
||||
|
b.ToTable("AbpTenantConnectionStrings", (string)null); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => |
||||
|
{ |
||||
|
b.Property<Guid>("Id") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<string>("Content") |
||||
|
.HasMaxLength(1048576) |
||||
|
.HasColumnType("longtext") |
||||
|
.HasColumnName("Content"); |
||||
|
|
||||
|
b.Property<DateTime>("CreationTime") |
||||
|
.HasColumnType("datetime(6)") |
||||
|
.HasColumnName("CreationTime"); |
||||
|
|
||||
|
b.Property<Guid?>("CreatorId") |
||||
|
.HasColumnType("char(36)") |
||||
|
.HasColumnName("CreatorId"); |
||||
|
|
||||
|
b.Property<string>("Culture") |
||||
|
.HasMaxLength(30) |
||||
|
.HasColumnType("varchar(30)") |
||||
|
.HasColumnName("Culture"); |
||||
|
|
||||
|
b.Property<string>("DisplayName") |
||||
|
.IsRequired() |
||||
|
.HasMaxLength(100) |
||||
|
.HasColumnType("varchar(100)") |
||||
|
.HasColumnName("DisplayName"); |
||||
|
|
||||
|
b.Property<DateTime?>("LastModificationTime") |
||||
|
.HasColumnType("datetime(6)") |
||||
|
.HasColumnName("LastModificationTime"); |
||||
|
|
||||
|
b.Property<Guid?>("LastModifierId") |
||||
|
.HasColumnType("char(36)") |
||||
|
.HasColumnName("LastModifierId"); |
||||
|
|
||||
|
b.Property<string>("Name") |
||||
|
.IsRequired() |
||||
|
.HasMaxLength(100) |
||||
|
.HasColumnType("varchar(100)") |
||||
|
.HasColumnName("Name"); |
||||
|
|
||||
|
b.Property<Guid?>("TenantId") |
||||
|
.HasColumnType("char(36)") |
||||
|
.HasColumnName("TenantId"); |
||||
|
|
||||
|
b.HasKey("Id"); |
||||
|
|
||||
|
b.HasIndex("TenantId", "Name") |
||||
|
.HasDatabaseName("IX_Tenant_Text_Template_Name"); |
||||
|
|
||||
|
b.ToTable("AbpTextTemplates", (string)null); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => |
||||
|
{ |
||||
|
b.Property<Guid>("Id") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<string>("Name") |
||||
|
.IsRequired() |
||||
|
.HasMaxLength(128) |
||||
|
.HasColumnType("varchar(128)"); |
||||
|
|
||||
|
b.Property<string>("ProviderKey") |
||||
|
.HasMaxLength(64) |
||||
|
.HasColumnType("varchar(64)"); |
||||
|
|
||||
|
b.Property<string>("ProviderName") |
||||
|
.HasMaxLength(64) |
||||
|
.HasColumnType("varchar(64)"); |
||||
|
|
||||
|
b.Property<string>("Value") |
||||
|
.IsRequired() |
||||
|
.HasMaxLength(128) |
||||
|
.HasColumnType("varchar(128)"); |
||||
|
|
||||
|
b.HasKey("Id"); |
||||
|
|
||||
|
b.HasIndex("Name", "ProviderName", "ProviderKey") |
||||
|
.IsUnique(); |
||||
|
|
||||
|
b.ToTable("AbpFeatureValues", (string)null); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => |
||||
|
{ |
||||
|
b.Property<Guid>("Id") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<string>("Name") |
||||
|
.IsRequired() |
||||
|
.HasMaxLength(128) |
||||
|
.HasColumnType("varchar(128)"); |
||||
|
|
||||
|
b.Property<string>("ProviderKey") |
||||
|
.IsRequired() |
||||
|
.HasMaxLength(64) |
||||
|
.HasColumnType("varchar(64)"); |
||||
|
|
||||
|
b.Property<string>("ProviderName") |
||||
|
.IsRequired() |
||||
|
.HasMaxLength(64) |
||||
|
.HasColumnType("varchar(64)"); |
||||
|
|
||||
|
b.Property<Guid?>("TenantId") |
||||
|
.HasColumnType("char(36)") |
||||
|
.HasColumnName("TenantId"); |
||||
|
|
||||
|
b.HasKey("Id"); |
||||
|
|
||||
|
b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") |
||||
|
.IsUnique(); |
||||
|
|
||||
|
b.ToTable("AbpPermissionGrants", (string)null); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => |
||||
|
{ |
||||
|
b.Property<Guid>("Id") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<string>("Name") |
||||
|
.IsRequired() |
||||
|
.HasMaxLength(128) |
||||
|
.HasColumnType("varchar(128)"); |
||||
|
|
||||
|
b.Property<string>("ProviderKey") |
||||
|
.HasMaxLength(64) |
||||
|
.HasColumnType("varchar(64)"); |
||||
|
|
||||
|
b.Property<string>("ProviderName") |
||||
|
.HasMaxLength(64) |
||||
|
.HasColumnType("varchar(64)"); |
||||
|
|
||||
|
b.Property<string>("Value") |
||||
|
.IsRequired() |
||||
|
.HasMaxLength(2048) |
||||
|
.HasColumnType("varchar(2048)"); |
||||
|
|
||||
|
b.HasKey("Id"); |
||||
|
|
||||
|
b.HasIndex("Name", "ProviderName", "ProviderKey") |
||||
|
.IsUnique(); |
||||
|
|
||||
|
b.ToTable("AbpSettings", (string)null); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => |
||||
|
{ |
||||
|
b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") |
||||
|
.WithMany() |
||||
|
.HasForeignKey("EditionId"); |
||||
|
|
||||
|
b.Navigation("Edition"); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => |
||||
|
{ |
||||
|
b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) |
||||
|
.WithMany("ConnectionStrings") |
||||
|
.HasForeignKey("TenantId") |
||||
|
.OnDelete(DeleteBehavior.Cascade) |
||||
|
.IsRequired(); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => |
||||
|
{ |
||||
|
b.Navigation("ConnectionStrings"); |
||||
|
}); |
||||
|
#pragma warning restore 612, 618
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,47 @@ |
|||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
|
#nullable disable |
||||
|
|
||||
|
namespace LY.MicroService.BackendAdmin.Migrations |
||||
|
{ |
||||
|
public partial class AlterCultureFieldAllowBeNull : Migration |
||||
|
{ |
||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.AlterColumn<string>( |
||||
|
name: "Culture", |
||||
|
table: "AbpTextTemplates", |
||||
|
type: "varchar(30)", |
||||
|
maxLength: 30, |
||||
|
nullable: true, |
||||
|
oldClrType: typeof(string), |
||||
|
oldType: "varchar(30)", |
||||
|
oldMaxLength: 30) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4"); |
||||
|
} |
||||
|
|
||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "AbpTextTemplates", |
||||
|
keyColumn: "Culture", |
||||
|
keyValue: null, |
||||
|
column: "Culture", |
||||
|
value: ""); |
||||
|
|
||||
|
migrationBuilder.AlterColumn<string>( |
||||
|
name: "Culture", |
||||
|
table: "AbpTextTemplates", |
||||
|
type: "varchar(30)", |
||||
|
maxLength: 30, |
||||
|
nullable: false, |
||||
|
oldClrType: typeof(string), |
||||
|
oldType: "varchar(30)", |
||||
|
oldMaxLength: 30, |
||||
|
oldNullable: true) |
||||
|
.Annotation("MySql:CharSet", "utf8mb4") |
||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue