From 388f5a1e79d31beefe01cc743dc3ad4ae1f1ace9 Mon Sep 17 00:00:00 2001
From: Hanpaopao <510423039@qq.com>
Date: Sat, 14 Dec 2024 10:14:41 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E4=BB=A3=E7=A0=81?=
=?UTF-8?q?=E7=94=9F=E6=88=90=E5=99=A8=E7=A4=BA=E4=BE=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Lion.AbpPro.HttpApi.Host/appsettings.json | 4 +-
.../Books/CreateBookInput.cs | 33 +
.../Books/DeleteBookInput.cs | 12 +
.../Books/IBookAppService.cs | 29 +
.../Books/PageBookInput.cs | 17 +
.../Books/PageBookOutput.cs | 43 +
.../Books/UpdateBookInput.cs | 38 +
.../Books/BookAppService.cs | 68 +
.../Lion.AbpPro.DbMigrator/appsettings.json | 2 +-
.../Books/BookDto.cs | 46 +
.../Books/BookType.cs | 13 +
.../src/Lion.AbpPro.Domain/Books/Book.cs | 115 +
.../Lion.AbpPro.Domain/Books/BookManager.cs | 73 +
.../Books/IBookRepository.cs | 10 +
.../Books/EfCoreBookRepository.cs | 36 +
.../20241213082843_1.0.0.Designer.cs | 2697 ++++++++++++++++
.../Migrations/20241213082843_1.0.0.cs | 1687 ++++++++++
.../20241213083759_1.0.1.Designer.cs | 2774 +++++++++++++++++
.../Migrations/20241213083759_1.0.1.cs | 53 +
.../AbpProDbContextModelSnapshot.cs | 2771 ++++++++++++++++
.../Controllers/BookController.cs | 45 +
21 files changed, 10563 insertions(+), 3 deletions(-)
create mode 100644 aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Books/CreateBookInput.cs
create mode 100644 aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Books/DeleteBookInput.cs
create mode 100644 aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Books/IBookAppService.cs
create mode 100644 aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Books/PageBookInput.cs
create mode 100644 aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Books/PageBookOutput.cs
create mode 100644 aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Books/UpdateBookInput.cs
create mode 100644 aspnet-core/services/src/Lion.AbpPro.Application/Books/BookAppService.cs
create mode 100644 aspnet-core/services/src/Lion.AbpPro.Domain.Shared/Books/BookDto.cs
create mode 100644 aspnet-core/services/src/Lion.AbpPro.Domain.Shared/Books/BookType.cs
create mode 100644 aspnet-core/services/src/Lion.AbpPro.Domain/Books/Book.cs
create mode 100644 aspnet-core/services/src/Lion.AbpPro.Domain/Books/BookManager.cs
create mode 100644 aspnet-core/services/src/Lion.AbpPro.Domain/Books/IBookRepository.cs
create mode 100644 aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/Books/EfCoreBookRepository.cs
create mode 100644 aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20241213082843_1.0.0.Designer.cs
create mode 100644 aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20241213082843_1.0.0.cs
create mode 100644 aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20241213083759_1.0.1.Designer.cs
create mode 100644 aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20241213083759_1.0.1.cs
create mode 100644 aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/AbpProDbContextModelSnapshot.cs
create mode 100644 aspnet-core/services/src/Lion.AbpPro.HttpApi/Controllers/BookController.cs
diff --git a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.json b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.json
index 75b8a2ff..3ea9d66e 100644
--- a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.json
+++ b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.json
@@ -34,9 +34,9 @@
"CorsOrigins": "https://*.AbpPro.com,http://localhost:4200,http://localhost:3100"
},
"ConnectionStrings": {
- "Default": "Data Source=182.43.18.151;Port=3306;Database=abpvnextpro1;uid=root;pwd=IFKy!Cufe3V9sYcz;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true",
+ "Default": "Data Source=182.43.18.151;Port=3306;Database=abpvnextprodemo1;uid=root;pwd=IFKy!Cufe3V9sYcz;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true",
// 可以单独设置代码模块的数据库连接,如果未设置,使用default
- "CodeManagement": "Data Source=182.43.18.151;Database=abpvnextpro1;uid=root;pwd=IFKy!Cufe3V9sYcz;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true"
+ //"CodeManagement": "Data Source=182.43.18.151;Database=abpvnextpro1;uid=root;pwd=IFKy!Cufe3V9sYcz;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true"
},
"Hangfire": {
"Redis": {
diff --git a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Books/CreateBookInput.cs b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Books/CreateBookInput.cs
new file mode 100644
index 00000000..f6f8ba51
--- /dev/null
+++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Books/CreateBookInput.cs
@@ -0,0 +1,33 @@
+using System.ComponentModel.DataAnnotations;
+
+namespace Lion.AbpPro.Books;
+
+///
+/// 创建书籍
+///
+public class CreateBookInput
+{
+ ///
+ /// 编号
+ ///
+ [Required(ErrorMessage = "编号不能为空")]
+ public string No { get; set; }
+ ///
+ /// 名称
+ ///
+ [Required(ErrorMessage = "名称不能为空")]
+ public string Name { get; set; }
+ ///
+ /// 价格
+ ///
+ [Required(ErrorMessage = "价格不能为空")]
+ public decimal Price { get; set; }
+ ///
+ /// 备注
+ ///
+ public string Remark { get; set; }
+ ///
+ /// 类型
+ ///
+ public BookType BookType { get; set; }
+}
\ No newline at end of file
diff --git a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Books/DeleteBookInput.cs b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Books/DeleteBookInput.cs
new file mode 100644
index 00000000..827572b0
--- /dev/null
+++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Books/DeleteBookInput.cs
@@ -0,0 +1,12 @@
+namespace Lion.AbpPro.Books;
+
+///
+/// 删除书籍
+///
+public class DeleteBookInput
+{
+ ///
+ /// 书籍Id
+ ///
+ public Guid Id { get; set; }
+}
\ No newline at end of file
diff --git a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Books/IBookAppService.cs b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Books/IBookAppService.cs
new file mode 100644
index 00000000..5ba6075f
--- /dev/null
+++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Books/IBookAppService.cs
@@ -0,0 +1,29 @@
+using Volo.Abp.Application.Dtos;
+
+namespace Lion.AbpPro.Books;
+
+///
+/// 书籍
+///
+public interface IBookAppService : IApplicationService
+{
+ ///
+ /// 分页查询书籍
+ ///
+ Task> PageAsync(PageBookInput input);
+
+ ///
+ /// 创建书籍
+ ///
+ Task CreateAsync(CreateBookInput input);
+
+ ///
+ /// 编辑书籍
+ ///
+ Task UpdateAsync(UpdateBookInput input);
+
+ ///
+ /// 删除书籍
+ ///
+ Task DeleteAsync(DeleteBookInput input);
+}
\ No newline at end of file
diff --git a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Books/PageBookInput.cs b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Books/PageBookInput.cs
new file mode 100644
index 00000000..4cacc4db
--- /dev/null
+++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Books/PageBookInput.cs
@@ -0,0 +1,17 @@
+namespace Lion.AbpPro.Books;
+
+///
+/// 分页查询书籍
+///
+public class PageBookInput : PagingBase
+{
+ ///
+ /// 开始创建时间
+ ///
+ public DateTime? StartCreationTime { get; set; }
+
+ ///
+ /// 结束创建时间
+ ///
+ public DateTime? EndCreationTime { get; set; }
+}
\ No newline at end of file
diff --git a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Books/PageBookOutput.cs b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Books/PageBookOutput.cs
new file mode 100644
index 00000000..7dbf10df
--- /dev/null
+++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Books/PageBookOutput.cs
@@ -0,0 +1,43 @@
+namespace Lion.AbpPro.Books;
+
+///
+/// 分页查询书籍
+///
+public class PageBookOutput
+{
+ ///
+ /// 书籍Id
+ ///
+ public Guid Id { get; set; }
+
+
+ ///
+ /// 编号
+ ///
+ public string No { get; set; }
+
+ ///
+ /// 名称
+ ///
+ public string Name { get; set; }
+
+ ///
+ /// 价格
+ ///
+ public decimal Price { get; set; }
+
+ ///
+ /// 备注
+ ///
+ public string Remark { get; set; }
+ ///
+ /// 类型
+ ///
+ public BookType BookType { get; set; }
+ public string BookTypeDescription => BookType.ToDescription();
+
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreationTime { get; set; }
+}
\ No newline at end of file
diff --git a/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Books/UpdateBookInput.cs b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Books/UpdateBookInput.cs
new file mode 100644
index 00000000..1c17fd70
--- /dev/null
+++ b/aspnet-core/services/src/Lion.AbpPro.Application.Contracts/Books/UpdateBookInput.cs
@@ -0,0 +1,38 @@
+using System.ComponentModel.DataAnnotations;
+
+namespace Lion.AbpPro.Books;
+
+///
+/// 更新书籍
+///
+public class UpdateBookInput
+{
+ ///
+ /// 书籍Id
+ ///
+ public Guid Id { get; set; }
+
+ ///
+ /// 编号
+ ///
+ [Required(ErrorMessage = "编号不能为空")]
+ public string No { get; set; }
+ ///
+ /// 名称
+ ///
+ [Required(ErrorMessage = "名称不能为空")]
+ public string Name { get; set; }
+ ///
+ /// 价格
+ ///
+ [Required(ErrorMessage = "价格不能为空")]
+ public decimal Price { get; set; }
+ ///
+ /// 备注
+ ///
+ public string Remark { get; set; }
+ ///
+ /// 类型
+ ///
+ public BookType BookType { get; set; }
+}
\ No newline at end of file
diff --git a/aspnet-core/services/src/Lion.AbpPro.Application/Books/BookAppService.cs b/aspnet-core/services/src/Lion.AbpPro.Application/Books/BookAppService.cs
new file mode 100644
index 00000000..168a9a5c
--- /dev/null
+++ b/aspnet-core/services/src/Lion.AbpPro.Application/Books/BookAppService.cs
@@ -0,0 +1,68 @@
+using Volo.Abp.Application.Dtos;
+
+namespace Lion.AbpPro.Books;
+
+///
+/// 书籍
+///
+public class BookAppService : ApplicationService, IBookAppService
+{
+ private readonly BookManager _bookManager;
+
+ public BookAppService(BookManager bookManager)
+ {
+ _bookManager = bookManager;
+ }
+
+ ///
+ /// 分页查询书籍
+ ///
+ public async Task> PageAsync(PageBookInput input)
+ {
+ var result = new PagedResultDto();
+ var totalCount = await _bookManager.GetCountAsync(input.StartCreationTime, input.EndCreationTime);
+ result.TotalCount = totalCount;
+ if (totalCount <= 0) return result;
+ var list = await _bookManager.GetListAsync(input.StartCreationTime, input.EndCreationTime, input.PageSize, input.SkipCount);
+ result.Items = ObjectMapper.Map, List>(list);
+ return result;
+ }
+
+ ///
+ /// 创建书籍
+ ///
+ public Task CreateAsync(CreateBookInput input)
+ {
+ return _bookManager.CreateAsync(
+ GuidGenerator.Create(),
+ input.No,
+ input.Name,
+ input.Price,
+ input.Remark,
+ input.BookType
+ );
+ }
+
+ ///
+ /// 编辑书籍
+ ///
+ public Task UpdateAsync(UpdateBookInput input)
+ {
+ return _bookManager.UpdateAsync(
+ input.Id,
+ input.No,
+ input.Name,
+ input.Price,
+ input.Remark,
+ input.BookType
+ );
+ }
+
+ ///
+ /// 删除书籍
+ ///
+ public Task DeleteAsync(DeleteBookInput input)
+ {
+ return _bookManager.DeleteAsync(input.Id);
+ }
+}
\ No newline at end of file
diff --git a/aspnet-core/services/src/Lion.AbpPro.DbMigrator/appsettings.json b/aspnet-core/services/src/Lion.AbpPro.DbMigrator/appsettings.json
index 2f055c66..42e1ad86 100644
--- a/aspnet-core/services/src/Lion.AbpPro.DbMigrator/appsettings.json
+++ b/aspnet-core/services/src/Lion.AbpPro.DbMigrator/appsettings.json
@@ -1,5 +1,5 @@
{
"ConnectionStrings": {
- "Default": "Data Source=182.43.18.151;Port=3306;Database=abpvnextpro1;uid=root;pwd=IFKy!Cufe3V9sYcz;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true"
+ "Default": "Data Source=182.43.18.151;Port=3306;Database=abpvnextprodemo1;uid=root;pwd=IFKy!Cufe3V9sYcz;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true"
}
}
\ No newline at end of file
diff --git a/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/Books/BookDto.cs b/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/Books/BookDto.cs
new file mode 100644
index 00000000..bb90f3dc
--- /dev/null
+++ b/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/Books/BookDto.cs
@@ -0,0 +1,46 @@
+namespace Lion.AbpPro.Books;
+
+///
+/// 书籍
+///
+public class BookDto
+{
+ ///
+ /// 主键Id
+ ///
+ public Guid Id { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreationTime { get; set; }
+
+ ///
+ /// 编号
+ ///
+ public string No { get; set; }
+ ///
+ /// 名称
+ ///
+ public string Name { get; set; }
+ ///
+ /// 价格
+ ///
+ public decimal Price { get; set; }
+ ///
+ /// 备注
+ ///
+ public string Remark { get; set; }
+ ///
+ /// 类型
+ ///
+ public BookType BookType { get; set; }
+
+
+ private const string CacheKeyFormat = "i:{0}";
+
+ public static string CalculateCacheKey(Guid id)
+ {
+ return string.Format(CacheKeyFormat, id);
+ }
+}
\ No newline at end of file
diff --git a/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/Books/BookType.cs b/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/Books/BookType.cs
new file mode 100644
index 00000000..ffc1437d
--- /dev/null
+++ b/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/Books/BookType.cs
@@ -0,0 +1,13 @@
+using System.ComponentModel;
+
+namespace Lion.AbpPro.Books;
+
+///
+/// 类型
+///
+public enum BookType
+{
+ [Description("历史")] History = 10,
+ [Description("小说")] Story = 20,
+ [Description("其它")] Other = 30,
+}
\ No newline at end of file
diff --git a/aspnet-core/services/src/Lion.AbpPro.Domain/Books/Book.cs b/aspnet-core/services/src/Lion.AbpPro.Domain/Books/Book.cs
new file mode 100644
index 00000000..5ab31ba2
--- /dev/null
+++ b/aspnet-core/services/src/Lion.AbpPro.Domain/Books/Book.cs
@@ -0,0 +1,115 @@
+using Lion.AbpPro.Core;
+using Volo.Abp.Domain.Entities.Auditing;
+
+namespace Lion.AbpPro.Books;
+
+///
+/// 书籍
+///
+public class Book : FullAuditedAggregateRoot
+{
+ private Book()
+ {
+ }
+
+
+ public Book(
+ Guid id,
+ string no,
+ string name,
+ decimal price,
+ string remark,
+ BookType bookType
+ ) : base(id)
+ {
+ SetNo(no);
+ SetName(name);
+ SetPrice(price);
+ SetRemark(remark);
+ SetBookType(bookType);
+ }
+
+ ///
+ /// 编号
+ ///
+ public string No { get; private set; }
+ ///
+ /// 名称
+ ///
+ public string Name { get; private set; }
+ ///
+ /// 价格
+ ///
+ public decimal Price { get; private set; }
+ ///
+ /// 备注
+ ///
+ public string Remark { get; private set; }
+ ///
+ /// 类型
+ ///
+ public BookType BookType { get; private set; }
+
+
+
+ ///
+ /// 设置编号
+ ///
+ private void SetNo(string no)
+ {
+ Guard.NotNullOrWhiteSpace(no, nameof(no), 128, 0);
+ No = no;
+ }
+
+ ///
+ /// 设置名称
+ ///
+ private void SetName(string name)
+ {
+ Guard.NotNullOrWhiteSpace(name, nameof(name), 128, 0);
+ Name = name;
+ }
+
+ ///
+ /// 设置价格
+ ///
+ private void SetPrice(decimal price)
+ {
+ Price = price;
+ }
+
+ ///
+ /// 设置备注
+ ///
+ private void SetRemark(string remark)
+ {
+ Guard.Length(remark, nameof(remark), 512, 0);
+ Remark = remark;
+ }
+
+ ///
+ /// 设置类型
+ ///
+ private void SetBookType(BookType bookType)
+ {
+ BookType = bookType;
+ }
+
+ ///
+ /// 更新书籍
+ ///
+ public void Update(
+ string no,
+ string name,
+ decimal price,
+ string remark,
+ BookType bookType
+ )
+ {
+ SetNo(no);
+ SetName(name);
+ SetPrice(price);
+ SetRemark(remark);
+ SetBookType(bookType);
+ }
+}
\ No newline at end of file
diff --git a/aspnet-core/services/src/Lion.AbpPro.Domain/Books/BookManager.cs b/aspnet-core/services/src/Lion.AbpPro.Domain/Books/BookManager.cs
new file mode 100644
index 00000000..d2b89c96
--- /dev/null
+++ b/aspnet-core/services/src/Lion.AbpPro.Domain/Books/BookManager.cs
@@ -0,0 +1,73 @@
+using Volo.Abp;
+
+namespace Lion.AbpPro.Books;
+
+public class BookManager : DomainService
+{
+ private readonly IBookRepository _bookRepository;
+ private readonly IObjectMapper _objectMapper;
+
+ public BookManager(IBookRepository bookRepository, IObjectMapper objectMapper)
+ {
+ _bookRepository = bookRepository;
+ _objectMapper = objectMapper;
+ }
+
+ public async Task> GetListAsync(DateTime? startDateTime = null, DateTime? endDateTime = null, int maxResultCount = 10, int skipCount = 0)
+ {
+ var list = await _bookRepository.GetListAsync(startDateTime, endDateTime, maxResultCount, skipCount);
+ return _objectMapper.Map, List>(list);
+ }
+
+ public async Task GetCountAsync(DateTime? startDateTime = null, DateTime? endDateTime = null)
+ {
+ return await _bookRepository.GetCountAsync(startDateTime, endDateTime);
+ }
+
+ ///
+ /// 创建书籍
+ ///
+ public async Task CreateAsync(
+ Guid id,
+ string no,
+ string name,
+ decimal price,
+ string remark,
+ BookType bookType
+ )
+ {
+ var entity = new Book(id, no, name, price, remark, bookType);
+ entity = await _bookRepository.InsertAsync(entity);
+ return _objectMapper.Map(entity);
+ }
+
+ ///
+ /// 更新书籍
+ ///
+ public async Task UpdateAsync(
+ Guid id,
+ string no,
+ string name,
+ decimal price,
+ string remark,
+ BookType bookType
+ )
+ {
+ var entity = await _bookRepository.FindAsync(id);
+ if (entity == null) throw new UserFriendlyException($"书籍不存在");
+ entity.Update(no, name, price, remark, bookType);
+ entity = await _bookRepository.UpdateAsync(entity);
+ return _objectMapper.Map(entity);
+ }
+
+ ///
+ /// 删除书籍
+ ///
+ public async Task DeleteAsync(Guid id)
+ {
+ var entity = await _bookRepository.FindAsync(id);
+ if (entity == null) throw new UserFriendlyException($"书籍不存在");
+ await _bookRepository.DeleteAsync(entity);
+ }
+
+}
\ No newline at end of file
diff --git a/aspnet-core/services/src/Lion.AbpPro.Domain/Books/IBookRepository.cs b/aspnet-core/services/src/Lion.AbpPro.Domain/Books/IBookRepository.cs
new file mode 100644
index 00000000..c6bf477a
--- /dev/null
+++ b/aspnet-core/services/src/Lion.AbpPro.Domain/Books/IBookRepository.cs
@@ -0,0 +1,10 @@
+using Volo.Abp.Domain.Repositories;
+
+namespace Lion.AbpPro.Books;
+
+public interface IBookRepository : IBasicRepository
+{
+ Task> GetListAsync(DateTime? startDateTime = null, DateTime? endDateTime = null, int maxResultCount = 10, int skipCount = 0);
+
+ Task GetCountAsync(DateTime? startDateTime = null, DateTime? endDateTime = null);
+}
\ No newline at end of file
diff --git a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/Books/EfCoreBookRepository.cs b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/Books/EfCoreBookRepository.cs
new file mode 100644
index 00000000..b54cf915
--- /dev/null
+++ b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/EntityFrameworkCore/Books/EfCoreBookRepository.cs
@@ -0,0 +1,36 @@
+using Lion.AbpPro.Books;
+using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
+using Volo.Abp.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore;
+
+namespace Lion.AbpPro.EntityFrameworkCore.Books;
+
+///
+/// 书籍 仓储Ef core 实现
+///
+public class EfCoreBookRepository :
+ EfCoreRepository,
+ IBookRepository
+{
+ public EfCoreBookRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider)
+ {
+ }
+
+ public async Task> GetListAsync(DateTime? startDateTime = null, DateTime? endDateTime = null,int maxResultCount = 10, int skipCount = 0)
+ {
+ return await (await GetDbSetAsync())
+ .WhereIf(startDateTime.HasValue, e => e.CreationTime >= startDateTime.Value)
+ .WhereIf(endDateTime.HasValue, e => e.CreationTime <= endDateTime.Value)
+ .OrderByDescending(e => e.CreationTime)
+ .PageBy(skipCount, maxResultCount)
+ .ToListAsync();
+ }
+
+ public async Task GetCountAsync(DateTime? startDateTime = null, DateTime? endDateTime = null)
+ {
+ return await (await GetDbSetAsync())
+ .WhereIf(startDateTime.HasValue, e => e.CreationTime >= startDateTime.Value)
+ .WhereIf(endDateTime.HasValue, e => e.CreationTime <= endDateTime.Value)
+ .CountAsync();
+ }
+}
\ No newline at end of file
diff --git a/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20241213082843_1.0.0.Designer.cs b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20241213082843_1.0.0.Designer.cs
new file mode 100644
index 00000000..fc0fe4b8
--- /dev/null
+++ b/aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20241213082843_1.0.0.Designer.cs
@@ -0,0 +1,2697 @@
+//
+using System;
+using Lion.AbpPro.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Volo.Abp.EntityFrameworkCore;
+
+#nullable disable
+
+namespace Lion.AbpPro.Migrations
+{
+ [DbContext(typeof(AbpProDbContext))]
+ [Migration("20241213082843_1.0.0")]
+ partial class _100
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql)
+ .HasAnnotation("ProductVersion", "8.0.4")
+ .HasAnnotation("Relational:MaxIdentifierLength", 64);
+
+ MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
+
+ modelBuilder.Entity("Lion.AbpPro.CodeManagement.DataTypes.Aggregates.DataType", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("char(36)");
+
+ b.Property("Code")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("char(36)")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("DeletionTime");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.HasKey("Id");
+
+ b.ToTable("AbpProDataType", (string)null);
+ });
+
+ modelBuilder.Entity("Lion.AbpPro.CodeManagement.EntityModels.Aggregates.EntityModel", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("char(36)");
+
+ b.Property("AggregateId")
+ .HasColumnType("char(36)");
+
+ b.Property("Code")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("char(36)")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("DeletionTime");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("ParentId")
+ .HasColumnType("char(36)");
+
+ b.Property("ProjectId")
+ .HasColumnType("char(36)");
+
+ b.Property("RelationalType")
+ .HasColumnType("int");
+
+ b.Property("TenantId")
+ .HasColumnType("char(36)")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Code");
+
+ b.ToTable("AbpProEntityModels", (string)null);
+ });
+
+ modelBuilder.Entity("Lion.AbpPro.CodeManagement.EntityModels.Aggregates.EntityModelProperty", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("char(36)");
+
+ b.Property("AllowAdd")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("AllowEdit")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("AllowSearch")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("Code")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property("DataTypeId")
+ .HasColumnType("char(36)");
+
+ b.Property("DecimalPrecision")
+ .HasColumnType("int");
+
+ b.Property("DecimalScale")
+ .HasColumnType("int");
+
+ b.Property("DeleterId")
+ .HasColumnType("char(36)")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("DeletionTime");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("EntityModelId")
+ .HasColumnType("char(36)");
+
+ b.Property("EnumTypeId")
+ .HasColumnType("char(36)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("IsRequired")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("MaxLength")
+ .HasColumnType("int");
+
+ b.Property("MinLength")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("EntityModelId");
+
+ b.ToTable("AbpProEntityModelProperties", (string)null);
+ });
+
+ modelBuilder.Entity("Lion.AbpPro.CodeManagement.EnumTypes.Aggregates.EnumType", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("char(36)");
+
+ b.Property("Code")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("char(36)")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("DeletionTime");
+
+ b.Property("Description")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("EntityModelId")
+ .HasColumnType("char(36)");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("ProjectId")
+ .HasColumnType("char(36)");
+
+ b.Property("TenantId")
+ .HasColumnType("char(36)")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Code");
+
+ b.ToTable("AbpProEnumType", (string)null);
+ });
+
+ modelBuilder.Entity("Lion.AbpPro.CodeManagement.EnumTypes.Aggregates.EnumTypeProperty", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("char(36)");
+
+ b.Property("Code")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("char(36)")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("DeletionTime");
+
+ b.Property("Description")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("EnumTypeId")
+ .HasColumnType("char(36)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Value")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Code");
+
+ b.HasIndex("EnumTypeId");
+
+ b.ToTable("AbpProEnumTypeProperty", (string)null);
+ });
+
+ modelBuilder.Entity("Lion.AbpPro.CodeManagement.Projects.Aggregates.Project", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("char(36)");
+
+ b.Property("CompanyName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("char(36)")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("DeletionTime");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("NameSpace")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("Owner")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("ProjectName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("Remark")
+ .HasMaxLength(512)
+ .HasColumnType("varchar(512)");
+
+ b.Property("TenantId")
+ .HasColumnType("char(36)")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.ToTable("AbpProProjects", (string)null);
+ });
+
+ modelBuilder.Entity("Lion.AbpPro.CodeManagement.Templates.Aggregates.Template", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("char(36)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("char(36)")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("DeletionTime");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("Remark")
+ .HasMaxLength(512)
+ .HasColumnType("varchar(512)");
+
+ b.Property("TenantId")
+ .HasColumnType("char(36)")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.ToTable("AbpProTemplates", (string)null);
+ });
+
+ modelBuilder.Entity("Lion.AbpPro.CodeManagement.Templates.Aggregates.TemplateDetail", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("char(36)");
+
+ b.Property("Content")
+ .HasColumnType("longtext");
+
+ b.Property("ControlType")
+ .HasColumnType("int");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("char(36)")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("DeletionTime");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("ParentId")
+ .HasColumnType("char(36)");
+
+ b.Property("TemplateId")
+ .HasColumnType("char(36)");
+
+ b.Property("TemplateType")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TemplateId");
+
+ b.ToTable("AbpProTemplateDetails", (string)null);
+ });
+
+ modelBuilder.Entity("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionary", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("char(36)");
+
+ b.Property("Code")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("char(36)")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("DeletionTime");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasMaxLength(1024)
+ .HasColumnType("varchar(1024)");
+
+ b.Property("DisplayText")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("TenantId")
+ .HasColumnType("char(36)")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.ToTable("AbpDataDictionaries", (string)null);
+ });
+
+ modelBuilder.Entity("Lion.AbpPro.DataDictionaryManagement.DataDictionaries.Aggregates.DataDictionaryDetail", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("char(36)");
+
+ b.Property("Code")
+ .HasColumnType("longtext");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property("DataDictionaryId")
+ .HasColumnType("char(36)");
+
+ b.Property("Description")
+ .HasColumnType("longtext");
+
+ b.Property("DisplayText")
+ .HasColumnType("longtext");
+
+ b.Property("IsEnabled")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Order")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("DataDictionaryId");
+
+ b.ToTable("AbpDataDictionaryDetails", (string)null);
+ });
+
+ modelBuilder.Entity("Lion.AbpPro.LanguageManagement.LanguageTexts.Aggregates.LanguageText", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("char(36)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property("CultureName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasComment("语言名称");
+
+ b.Property("DeleterId")
+ .HasColumnType("char(36)")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("DeletionTime");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)")
+ .HasComment("名称");
+
+ b.Property("ResourceName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasComment("资源名称");
+
+ b.Property("TenantId")
+ .HasColumnType("char(36)")
+ .HasColumnName("TenantId");
+
+ b.Property("Value")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)")
+ .HasComment("值");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "ResourceName", "CultureName");
+
+ b.ToTable("AbpLanguageTexts", (string)null);
+ });
+
+ modelBuilder.Entity("Lion.AbpPro.LanguageManagement.Languages.Aggregates.Language", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("char(36)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property("CultureName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasComment("语言名称");
+
+ b.Property("DeleterId")
+ .HasColumnType("char(36)")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("DeletionTime");
+
+ b.Property("DisplayName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasComment("显示名称");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("FlagIcon")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasComment("图标");
+
+ b.Property("IsDefault")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("IsEnabled")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("TenantId")
+ .HasColumnType("char(36)")
+ .HasColumnName("TenantId");
+
+ b.Property("UiCultureName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasComment("Ui语言名称");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CultureName");
+
+ b.ToTable("AbpLanguages", (string)null);
+ });
+
+ modelBuilder.Entity("Lion.AbpPro.NotificationManagement.Notifications.Aggregates.Notification", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("char(36)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("Content")
+ .IsRequired()
+ .HasMaxLength(1024)
+ .HasColumnType("varchar(1024)");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("char(36)")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("DeletionTime");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("MessageLevel")
+ .HasColumnType("int");
+
+ b.Property("MessageType")
+ .HasColumnType("int");
+
+ b.Property("Read")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("ReadTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("ReceiveUserId")
+ .HasColumnType("char(36)");
+
+ b.Property("ReceiveUserName")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("SenderUserId")
+ .HasColumnType("char(36)");
+
+ b.Property("SenderUserName")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("TenantId")
+ .HasColumnType("char(36)")
+ .HasColumnName("TenantId");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.HasKey("Id");
+
+ b.ToTable("AbpNotifications", (string)null);
+ });
+
+ modelBuilder.Entity("Lion.AbpPro.NotificationManagement.Notifications.Aggregates.NotificationSubscription", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("char(36)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("char(36)")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("char(36)")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("DeletionTime");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime(6)")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("char(36)")
+ .HasColumnName("LastModifierId");
+
+ b.Property("NotificationId")
+ .HasColumnType("char(36)");
+
+ b.Property("Read")
+ .HasColumnType("tinyint(1)");
+
+ b.Property("ReadTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("ReceiveUserId")
+ .HasColumnType("char(36)");
+
+ b.Property("ReceiveUserName")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)");
+
+ b.Property("TenantId")
+ .HasColumnType("char(36)")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("NotificationId");
+
+ b.HasIndex("ReceiveUserId");
+
+ b.ToTable("AbpNotificationSubscriptions", (string)null);
+ });
+
+ modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("char(36)");
+
+ b.Property("ApplicationName")
+ .HasMaxLength(96)
+ .HasColumnType("varchar(96)")
+ .HasColumnName("ApplicationName");
+
+ b.Property("BrowserInfo")
+ .HasMaxLength(512)
+ .HasColumnType("varchar(512)")
+ .HasColumnName("BrowserInfo");
+
+ b.Property("ClientId")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)")
+ .HasColumnName("ClientId");
+
+ b.Property("ClientIpAddress")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)")
+ .HasColumnName("ClientIpAddress");
+
+ b.Property("ClientName")
+ .HasMaxLength(128)
+ .HasColumnType("varchar(128)")
+ .HasColumnName("ClientName");
+
+ b.Property("Comments")
+ .HasMaxLength(256)
+ .HasColumnType("varchar(256)")
+ .HasColumnName("Comments");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasMaxLength(40)
+ .HasColumnType("varchar(40)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CorrelationId")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)")
+ .HasColumnName("CorrelationId");
+
+ b.Property("Exceptions")
+ .HasColumnType("longtext");
+
+ b.Property("ExecutionDuration")
+ .HasColumnType("int")
+ .HasColumnName("ExecutionDuration");
+
+ b.Property("ExecutionTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("ExtraProperties")
+ .IsRequired()
+ .HasColumnType("longtext")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("HttpMethod")
+ .HasMaxLength(16)
+ .HasColumnType("varchar(16)")
+ .HasColumnName("HttpMethod");
+
+ b.Property("HttpStatusCode")
+ .HasColumnType("int")
+ .HasColumnName("HttpStatusCode");
+
+ b.Property("ImpersonatorTenantId")
+ .HasColumnType("char(36)")
+ .HasColumnName("ImpersonatorTenantId");
+
+ b.Property("ImpersonatorTenantName")
+ .HasMaxLength(64)
+ .HasColumnType("varchar(64)")
+ .HasColumnName("ImpersonatorTenantName");
+
+ b.Property("ImpersonatorUserId")
+ .HasColumnType("char(36)")
+ .HasColumnName("ImpersonatorUserId");
+
+ b.Property