Browse Source

设备

master
wxd 1 year ago
parent
commit
d655b34c75
  1. 31
      src/Shentun.Peis.Application.Contracts/Devices/CreateDeviceDto.cs
  2. 42
      src/Shentun.Peis.Application.Contracts/Devices/DeviceDto.cs
  3. 11
      src/Shentun.Peis.Application.Contracts/Devices/DeviceIdInputDto.cs
  4. 19
      src/Shentun.Peis.Application.Contracts/Devices/DeviceListInputDto.cs
  5. 34
      src/Shentun.Peis.Application.Contracts/Devices/UpdateDeviceDto.cs
  6. 19
      src/Shentun.Peis.Application.Contracts/Devices/UpdateManySortDeviceInputDto.cs
  7. 169
      src/Shentun.Peis.Application/Devices/DeviceAppService.cs
  8. 7
      src/Shentun.Peis.Application/PeisApplicationAutoMapperProfile.cs
  9. 67
      src/Shentun.Peis.Domain/Devices/Device.cs
  10. 149
      src/Shentun.Peis.Domain/Devices/DeviceManager.cs
  11. 7
      src/Shentun.Peis.Domain/RegisterCheckPictures/RegisterCheckPicture.cs
  12. 28
      src/Shentun.Peis.EntityFrameworkCore/DbMapping/Devices/DeviceDbMapping.cs
  13. 2
      src/Shentun.Peis.EntityFrameworkCore/DbMapping/RegisterCheckPictures/RegisterCheckPictureDbMapping.cs
  14. 6
      src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs
  15. 15711
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20240920090638_insert_device.Designer.cs
  16. 53
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20240920090638_insert_device.cs
  17. 74
      src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs

31
src/Shentun.Peis.Application.Contracts/Devices/CreateDeviceDto.cs

@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Shentun.Peis.Devices
{
public class CreateDeviceDto
{
/// <summary>
/// 名称
/// </summary>
public string DisplayName { get; set; }
/// <summary>
/// 仪器类别
/// </summary>
public Guid DeviceTypeId { get; set; }
/// <summary>
/// 设备协议 0-视频采集图片和导入图片,1-dicom
/// </summary>
public char DeviceProtocolFlag { get; set; }
/// <summary>
/// DICOM设备AETitle 该一般字段存储英文字符,仅DICOM设备需要设置
/// </summary>
public string AeTitle { get; set; }
}
}

42
src/Shentun.Peis.Application.Contracts/Devices/DeviceDto.cs

@ -0,0 +1,42 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Text;
namespace Shentun.Peis.Devices
{
public class DeviceDto : AuditedEntityDtoName
{
/// <summary>
/// 名称
/// </summary>
public string DisplayName { get; set; }
/// <summary>
/// 仪器类别
/// </summary>
public Guid DeviceTypeId { get; set; }
/// <summary>
/// 设备协议 0-视频采集图片和导入图片,1-dicom
/// </summary>
public char DeviceProtocolFlag { get; set; }
/// <summary>
/// DICOM设备AETitle 该一般字段存储英文字符,仅DICOM设备需要设置
/// </summary>
public string AeTitle { get; set; }
/// <summary>
/// 简码
/// </summary>
public string SimpleCode { get; set; }
/// <summary>
/// 排序
/// </summary>
public int DisplayOrder { get; set; }
}
}

11
src/Shentun.Peis.Application.Contracts/Devices/DeviceIdInputDto.cs

@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Shentun.Peis.Devices
{
public class DeviceIdInputDto
{
public Guid DeviceId { get; set; }
}
}

19
src/Shentun.Peis.Application.Contracts/Devices/DeviceListInputDto.cs

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Shentun.Peis.Devices
{
public class DeviceListInputDto
{
/// <summary>
/// 仪器类别
/// </summary>
public Guid? DeviceTypeId { get; set; }
/// <summary>
/// 检索名字 简码
/// </summary>
public string KeyWord { get; set; }
}
}

34
src/Shentun.Peis.Application.Contracts/Devices/UpdateDeviceDto.cs

@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Shentun.Peis.Devices
{
public class UpdateDeviceDto
{
/// <summary>
/// 设备ID
/// </summary>
public Guid DeviceId { get; set; }
/// <summary>
/// 名称
/// </summary>
public string DisplayName { get; set; }
/// <summary>
/// 仪器类别
/// </summary>
public Guid DeviceTypeId { get; set; }
/// <summary>
/// 设备协议 0-视频采集图片和导入图片,1-dicom
/// </summary>
public char DeviceProtocolFlag { get; set; }
/// <summary>
/// DICOM设备AETitle 该一般字段存储英文字符,仅DICOM设备需要设置
/// </summary>
public string AeTitle { get; set; }
}
}

19
src/Shentun.Peis.Application.Contracts/Devices/UpdateManySortDeviceInputDto.cs

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Shentun.Peis.Devices
{
public class UpdateManySortDeviceInputDto
{
/// <summary>
/// 需要修改的ID
/// </summary>
public Guid DeviceId { get; set; }
/// <summary>
/// 修改方式:1 置顶 2 置底
/// </summary>
public int SortType { get; set; }
}
}

169
src/Shentun.Peis.Application/Devices/DeviceAppService.cs

@ -0,0 +1,169 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Shentun.Peis.Devices;
using Shentun.Peis.HelperDto;
using Shentun.Peis.Models;
using Shentun.Peis.PatientRegisters;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Repositories;
namespace Shentun.Peis.Devices
{
/// <summary>
/// 危急值
/// </summary>
[ApiExplorerSettings(GroupName = "Work")]
[Authorize]
public class DeviceAppService : ApplicationService
{
private readonly IRepository<Device, Guid> _deviceRepository;
private readonly CacheService _cacheService;
private readonly DeviceManager _deviceManager;
public DeviceAppService(
IRepository<Device, Guid> deviceRepository,
CacheService cacheService,
DeviceManager deviceManager
)
{
_deviceRepository = deviceRepository;
_cacheService = cacheService;
_deviceManager = deviceManager;
}
/// <summary>
/// 获取通过主键
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/Device/Get")]
public async Task<DeviceDto> GetAsync(DeviceIdInputDto input)
{
var deviceEnt = await _deviceRepository.GetAsync(input.DeviceId);
var entityDto = ObjectMapper.Map<Device, DeviceDto>(deviceEnt);
entityDto.CreatorName = await _cacheService.GetSurnameAsync(entityDto.CreatorId);
entityDto.LastModifierName = await _cacheService.GetSurnameAsync(entityDto.LastModifierId);
return entityDto;
}
/// <summary>
/// 获取列表 可根据条件检索
/// </summary>
/// <returns></returns>
[HttpPost("api/app/Device/GetList")]
public async Task<List<DeviceDto>> GetListAsync(DeviceListInputDto input)
{
var query = await _deviceRepository.GetQueryableAsync();
if (input.DeviceTypeId != null)
query = query.Where(m => m.DeviceTypeId == input.DeviceTypeId);
if (!string.IsNullOrWhiteSpace(input.KeyWord))
query = query.Where(m => m.DisplayName.Contains(input.KeyWord) || m.SimpleCode.Contains(input.KeyWord));
var entdto = query.Select(s => new DeviceDto
{
CreationTime = s.CreationTime,
CreatorId = s.CreatorId,
DisplayName = s.DisplayName,
DisplayOrder = s.DisplayOrder,
Id = s.Id,
DeviceTypeId = s.DeviceTypeId,
AeTitle = s.AeTitle,
SimpleCode = s.SimpleCode,
DeviceProtocolFlag = s.DeviceProtocolFlag,
LastModificationTime = s.LastModificationTime,
LastModifierId = s.LastModifierId,
CreatorName = _cacheService.GetSurnameAsync(s.CreatorId).Result,
LastModifierName = _cacheService.GetSurnameAsync(s.LastModifierId).Result
}).OrderBy(o => o.DisplayOrder).ToList();
return entdto;
}
/// <summary>
/// 创建
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/Device/Create")]
public async Task<DeviceDto> CreateAsync(CreateDeviceDto input)
{
var createEntity = ObjectMapper.Map<CreateDeviceDto, Device>(input);
var entity = await _deviceManager.CreateAsync(createEntity);
entity = await _deviceRepository.InsertAsync(entity);
var dto = ObjectMapper.Map<Device, DeviceDto>(entity);
dto.CreatorName = await _cacheService.GetSurnameAsync(dto.CreatorId);
dto.LastModifierName = await _cacheService.GetSurnameAsync(dto.LastModifierId);
return dto;
}
/// <summary>
/// 更新
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/Device/Update")]
public async Task<DeviceDto> UpdateAsync(UpdateDeviceDto input)
{
var entity = await _deviceRepository.GetAsync(input.DeviceId);
var sourceEntity = ObjectMapper.Map<UpdateDeviceDto, Device>(input);
await _deviceManager.UpdateAsync(sourceEntity, entity);
entity = await _deviceRepository.UpdateAsync(entity);
var dto = ObjectMapper.Map<Device, DeviceDto>(entity);
dto.CreatorName = await _cacheService.GetSurnameAsync(dto.CreatorId);
dto.LastModifierName = await _cacheService.GetSurnameAsync(dto.LastModifierId);
return dto;
}
/// <summary>
/// 删除
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/Device/Delete")]
public async Task DeleteAsync(DeviceIdInputDto input)
{
await _deviceManager.CheckAndDeleteAsync(input.DeviceId);
}
/// <summary>
/// 修改排序 置顶,置底
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/Device/UpdateManySort")]
public async Task UpdateManySortAsync(UpdateManySortDeviceInputDto input)
{
await _deviceManager.UpdateManySortAsync(input.DeviceId, input.SortType);
}
/// <summary>
/// 修改排序 拖拽
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/Device/UpdateSortMany")]
public async Task UpdateSortManyAsync(UpdateSortManyCommonDto input)
{
await _deviceManager.UpdateSortManyAsync(input);
}
}
}

7
src/Shentun.Peis.Application/PeisApplicationAutoMapperProfile.cs

@ -26,6 +26,7 @@ using Shentun.Peis.CustomerOrgGroups;
using Shentun.Peis.CustomerOrgRegisters;
using Shentun.Peis.CustomerOrgs;
using Shentun.Peis.CustomerOrgTypes;
using Shentun.Peis.Devices;
using Shentun.Peis.DeviceTypes;
using Shentun.Peis.Diagnosises;
using Shentun.Peis.DiagnosisLevels;
@ -599,6 +600,12 @@ public class PeisApplicationAutoMapperProfile : Profile
CreateMap<SmsSend, SmsSendDto>();
//É豸
CreateMap<DeviceDto, DeviceDto>();
CreateMap<CreateDeviceDto, DeviceDto>();
CreateMap<UpdateDeviceDto, DeviceDto>();
}
}

67
src/Shentun.Peis.Domain/Devices/Device.cs

@ -0,0 +1,67 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace Shentun.Peis.Models
{
/// <summary>
/// 仪器表
/// </summary>
public class Device : AuditedEntity<Guid>, IHasConcurrencyStamp, IDisplayName, IDisplayOrder
{
public Device(Guid id) : base(id)
{
}
/// <summary>
/// 名称
/// </summary>
[Column("Display_Name")]
[StringLength(100)]
public string DisplayName { get; set; }
/// <summary>
/// 仪器类别
/// </summary>
[Column("device_type_id")]
public Guid DeviceTypeId { get; set; }
/// <summary>
/// 设备协议 0-视频采集图片和导入图片,1-dicom
/// </summary>
[Column("device_protocol_flag")]
public char DeviceProtocolFlag { get; set; }
/// <summary>
/// DICOM设备AETitle 该一般字段存储英文字符,仅DICOM设备需要设置
/// </summary>
[Column("ae_title")]
[StringLength(50)]
public string AeTitle { get; set; }
/// <summary>
/// 简码
/// </summary>
[Column("simple_code")]
[StringLength(100)]
public string SimpleCode { get; set; }
/// <summary>
/// 排序
/// </summary>
[Column("display_order")]
public int DisplayOrder { get; set; }
[Column("concurrency_stamp")]
public string ConcurrencyStamp { get; set; }
}
}

149
src/Shentun.Peis.Domain/Devices/DeviceManager.cs

@ -0,0 +1,149 @@
using Shentun.Peis.HelperDto;
using Shentun.Peis.Models;
using Shentun.Utilities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Domain.Services;
namespace Shentun.Peis.Devices
{
public class DeviceManager : DomainService
{
private readonly IRepository<Device, Guid> _deviceRepository;
private readonly IRepository<RegisterCheckPicture, Guid> _registerCheckPictureRepository;
public DeviceManager(
IRepository<Device, Guid> deviceRepository,
IRepository<RegisterCheckPicture, Guid> registerCheckPictureRepository
)
{
_deviceRepository = deviceRepository;
_registerCheckPictureRepository = registerCheckPictureRepository;
}
/// <summary>
/// 创建
/// </summary>
/// <param name="entity"></param>
/// <returns></returns>
public async Task<Device> CreateAsync(
Device entity
)
{
Verify(entity);
await EntityHelper.CheckSameName(_deviceRepository, entity.DisplayName);
return new Device(GuidGenerator.Create())
{
DisplayName = entity.DisplayName,
DeviceProtocolFlag = entity.DeviceProtocolFlag,
SimpleCode = LanguageConverter.GetPYSimpleCode(entity.DisplayName),
AeTitle = entity.AeTitle,
DeviceTypeId = entity.DeviceTypeId,
DisplayOrder = await EntityHelper.CreateMaxDisplayOrder(_deviceRepository)
};
}
/// <summary>
/// 更新
/// </summary>
/// <param name="sourceEntity"></param>
/// <param name="targetEntity"></param>
/// <returns></returns>
public async Task UpdateAsync(
Device sourceEntity,
Device targetEntity
)
{
DataHelper.CheckEntityIsNull(sourceEntity);
Verify(targetEntity);
if (sourceEntity.DisplayName != targetEntity.DisplayName)
{
await EntityHelper.CheckSameName(_deviceRepository, sourceEntity.DisplayName, targetEntity);
targetEntity.DisplayName = sourceEntity.DisplayName;
targetEntity.SimpleCode = LanguageConverter.GetPYSimpleCode(sourceEntity.DisplayName);
}
targetEntity.DeviceTypeId = sourceEntity.DeviceTypeId;
targetEntity.DeviceProtocolFlag = sourceEntity.DeviceProtocolFlag;
targetEntity.AeTitle = sourceEntity.AeTitle;
}
/// <summary>
/// 删除
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
/// <exception cref="UserFriendlyException"></exception>
public async Task CheckAndDeleteAsync(Guid id)
{
var deviceCount = await _registerCheckPictureRepository.CountAsync(f => f.DeviceId == id);
if (deviceCount > 0)
{
throw new UserFriendlyException("设备已被使用,不能删除");
}
await _deviceRepository.DeleteAsync(id);
}
/// <summary>
/// 修改排序 置顶,置底
/// </summary>
/// <param name="id">需要修改的ID</param>
/// <param name="SortType">修改方式:1 置顶 2 置底</param>
/// <returns></returns>
public async Task UpdateManySortAsync(Guid id, int SortType)
{
await EntityHelper.UpdateManySortCommonAsync(_deviceRepository, id, SortType);
}
/// <summary>
/// 修改排序 拖拽
/// </summary>
/// <typeparam name="TEntity"></typeparam>
/// <param name="repository"></param>
/// <param name="input"></param>
/// <returns></returns>
public async Task UpdateSortManyAsync(UpdateSortManyCommonDto input)
{
await EntityHelper.UpdateSortManyCommonAsync(_deviceRepository, input);
}
/// <summary>
/// 检查空值
/// </summary>
/// <param name="entity"></param>
private void Verify(Device entity)
{
DataHelper.CheckEntityIsNull(entity);
DataHelper.CheckStringIsNull(entity.DisplayName, "名称");
DataHelper.CheckGuidIsDefaultValue(entity.DeviceTypeId, "仪器类别");
if (entity.DeviceProtocolFlag != '0' && entity.DeviceProtocolFlag != '1')
{
throw new ArgumentException($"设备协议只能为0,1");
}
}
}
}

7
src/Shentun.Peis.Domain/RegisterCheckPictures/RegisterCheckPicture.cs

@ -46,6 +46,13 @@ namespace Shentun.Peis.Models
/// </summary>
[Column("local_path_name")]
public string LocalPathName { get; set; }
/// <summary>
/// 设备id
/// </summary>
[Column("device_id")]
public Guid? DeviceId { get; set; }
/// <summary>
/// 显示顺序
/// </summary>

28
src/Shentun.Peis.EntityFrameworkCore/DbMapping/Devices/DeviceDbMapping.cs

@ -0,0 +1,28 @@
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.EntityFrameworkCore;
using Shentun.Peis.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Shentun.Peis.Devices;
using Shentun.Peis.EntityFrameworkCore;
namespace Shentun.Peis.DbMapping
{
internal class DeviceDbMapping : IEntityTypeConfiguration<Device>
{
public void Configure(EntityTypeBuilder<Device> entity)
{
entity.HasComment("设备表");
entity.Property(t => t.DisplayName).HasComment("设备名称");
entity.Property(t => t.DeviceTypeId).HasComment("仪器类别ID");
entity.Property(t => t.DeviceProtocolFlag).HasComment("设备协议");
entity.Property(t => t.AeTitle).HasComment("DICOM设备AETitle");
entity.ConfigureByConvention();
}
}
}

2
src/Shentun.Peis.EntityFrameworkCore/DbMapping/RegisterCheckPictures/RegisterCheckPictureDbMapping.cs

@ -36,6 +36,8 @@ namespace Shentun.Peis.DbMapping
entity.Property(e => e.LocalPathName).HasComment("本地资源路径");
entity.Property(e => e.DeviceId).HasComment("设备ID");
entity.HasOne(d => d.RegisterCheck)
.WithMany(p => p.RegisterCheckPictures)
.HasForeignKey(d => d.RegisterCheckId)

6
src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs

@ -11,6 +11,7 @@ using Shentun.Peis.DbMapping.ChargeRequestAsbitems;
using Shentun.Peis.DbMapping.ChargeRequests;
using Shentun.Peis.DbMapping.PatientRegisterExters;
using Shentun.Peis.DbMapping.ThirdInterfaces;
using Shentun.Peis.Devices;
using Shentun.Peis.Models;
using Shentun.Peis.OcCheckTypeDetails;
using Shentun.Peis.ProtectiveMeasuress;
@ -367,6 +368,8 @@ public class PeisDbContext :
public DbSet<RegisterCheckPacsPicture> RegisterCheckPacsPictures { get; set; } = null!;
public DbSet<Device> Devices { get; set; } = null!;
public PeisDbContext(DbContextOptions<PeisDbContext> options)
: base(options)
{
@ -612,7 +615,8 @@ public class PeisDbContext :
.ApplyConfiguration(new CommonTableDbMapping())
.ApplyConfiguration(new CommonTableTypeDbMapping())
.ApplyConfiguration(new RegisterCheckPacsDbMapping())
.ApplyConfiguration(new RegisterCheckPacsPictureDbMapping());
.ApplyConfiguration(new RegisterCheckPacsPictureDbMapping())
.ApplyConfiguration(new DeviceDbMapping());
#endregion

15711
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240920090638_insert_device.Designer.cs
File diff suppressed because it is too large
View File

53
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240920090638_insert_device.cs

@ -0,0 +1,53 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Shentun.Peis.Migrations
{
public partial class insert_device : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "device_id",
table: "register_check_picture",
type: "uuid",
nullable: true,
comment: "设备ID");
migrationBuilder.CreateTable(
name: "Devices",
columns: table => new
{
id = table.Column<Guid>(type: "uuid", nullable: false),
Display_Name = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: true, comment: "设备名称"),
device_type_id = table.Column<Guid>(type: "uuid", nullable: false, comment: "仪器类别ID"),
device_protocol_flag = table.Column<char>(type: "character(1)", nullable: false, comment: "设备协议"),
ae_title = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true, comment: "DICOM设备AETitle"),
simple_code = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: true),
display_order = table.Column<int>(type: "integer", nullable: false),
concurrency_stamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true),
creation_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
creator_id = table.Column<Guid>(type: "uuid", nullable: false),
last_modification_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
last_modifier_id = table.Column<Guid>(type: "uuid", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Devices", x => x.id);
},
comment: "设备表");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Devices");
migrationBuilder.DropColumn(
name: "device_id",
table: "register_check_picture");
}
}
}

74
src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs

@ -377,6 +377,75 @@ namespace Shentun.Peis.Migrations
b.ToTable("test_ct");
});
modelBuilder.Entity("Shentun.Peis.Devices.Device", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid")
.HasColumnName("id");
b.Property<string>("AeTitle")
.HasMaxLength(50)
.HasColumnType("character varying(50)")
.HasColumnName("ae_title")
.HasComment("DICOM设备AETitle");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("character varying(40)")
.HasColumnName("concurrency_stamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp without time zone")
.HasColumnName("creation_time");
b.Property<Guid?>("CreatorId")
.IsRequired()
.HasColumnType("uuid")
.HasColumnName("creator_id");
b.Property<char>("DeviceProtocolFlag")
.HasColumnType("character(1)")
.HasColumnName("device_protocol_flag")
.HasComment("设备协议");
b.Property<Guid>("DeviceTypeId")
.HasColumnType("uuid")
.HasColumnName("device_type_id")
.HasComment("仪器类别ID");
b.Property<string>("DisplayName")
.HasMaxLength(100)
.HasColumnType("character varying(100)")
.HasColumnName("Display_Name")
.HasComment("设备名称");
b.Property<int>("DisplayOrder")
.HasColumnType("integer")
.HasColumnName("display_order");
b.Property<DateTime?>("LastModificationTime")
.IsRequired()
.HasColumnType("timestamp without time zone")
.HasColumnName("last_modification_time");
b.Property<Guid?>("LastModifierId")
.IsRequired()
.HasColumnType("uuid")
.HasColumnName("last_modifier_id");
b.Property<string>("SimpleCode")
.HasMaxLength(100)
.HasColumnType("character varying(100)")
.HasColumnName("simple_code");
b.HasKey("Id");
b.ToTable("Devices");
b.HasComment("设备表");
});
modelBuilder.Entity("Shentun.Peis.Models.AbpUserDepartment", b =>
{
b.Property<Guid>("UserId")
@ -9169,6 +9238,11 @@ namespace Shentun.Peis.Migrations
.HasColumnType("uuid")
.HasColumnName("creator_id");
b.Property<Guid?>("DeviceId")
.HasColumnType("uuid")
.HasColumnName("device_id")
.HasComment("设备ID");
b.Property<int>("DisplayOrder")
.ValueGeneratedOnAdd()
.HasColumnType("integer")

Loading…
Cancel
Save