12 changed files with 16363 additions and 5 deletions
			
			
		- 
					10src/Shentun.Peis.Application.Contracts/Devices/CreateDeviceDto.cs
 - 
					11src/Shentun.Peis.Application.Contracts/Devices/DeviceCodeInputDto.cs
 - 
					11src/Shentun.Peis.Application.Contracts/Devices/DeviceDto.cs
 - 
					14src/Shentun.Peis.Application.Contracts/Devices/GetDeviceImageTypeByDeviceCodeDto.cs
 - 
					10src/Shentun.Peis.Application.Contracts/Devices/UpdateDeviceDto.cs
 - 
					31src/Shentun.Peis.Application/Devices/DeviceAppService.cs
 - 
					16src/Shentun.Peis.Domain/Devices/Device.cs
 - 
					20src/Shentun.Peis.Domain/Devices/DeviceManager.cs
 - 
					4src/Shentun.Peis.EntityFrameworkCore/DbMapping/Devices/DeviceDbMapping.cs
 - 
					16157src/Shentun.Peis.EntityFrameworkCore/Migrations/20241121123435_update_device_code.Designer.cs
 - 
					66src/Shentun.Peis.EntityFrameworkCore/Migrations/20241121123435_update_device_code.cs
 - 
					16src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs
 
@ -0,0 +1,11 @@ | 
				
			|||
using System; | 
				
			|||
using System.Collections.Generic; | 
				
			|||
using System.Text; | 
				
			|||
 | 
				
			|||
namespace Shentun.Peis.Devices | 
				
			|||
{ | 
				
			|||
    public class DeviceCodeInputDto | 
				
			|||
    { | 
				
			|||
        public string DeviceCode { get; set; } | 
				
			|||
    } | 
				
			|||
} | 
				
			|||
@ -0,0 +1,14 @@ | 
				
			|||
using System; | 
				
			|||
using System.Collections.Generic; | 
				
			|||
using System.Text; | 
				
			|||
 | 
				
			|||
namespace Shentun.Peis.Devices | 
				
			|||
{ | 
				
			|||
    public class GetDeviceImageTypeByDeviceCodeDto | 
				
			|||
    { | 
				
			|||
        /// <summary>
 | 
				
			|||
        /// 仪器图片类型
 | 
				
			|||
        /// </summary>
 | 
				
			|||
        public char DeviceImageType { get; set; } | 
				
			|||
    } | 
				
			|||
} | 
				
			|||
						
							
						
						
							16157
	
						
						src/Shentun.Peis.EntityFrameworkCore/Migrations/20241121123435_update_device_code.Designer.cs
						
							File diff suppressed because it is too large
							
							
								
									View File
								
							
						
					
				File diff suppressed because it is too large
							
							
								
									View File
								
							
						@ -0,0 +1,66 @@ | 
				
			|||
using Microsoft.EntityFrameworkCore.Migrations; | 
				
			|||
 | 
				
			|||
#nullable disable | 
				
			|||
 | 
				
			|||
namespace Shentun.Peis.Migrations | 
				
			|||
{ | 
				
			|||
    public partial class update_device_code : Migration | 
				
			|||
    { | 
				
			|||
        protected override void Up(MigrationBuilder migrationBuilder) | 
				
			|||
        { | 
				
			|||
            migrationBuilder.DropPrimaryKey( | 
				
			|||
                name: "PK_Devices", | 
				
			|||
                table: "Devices"); | 
				
			|||
 | 
				
			|||
            migrationBuilder.RenameTable( | 
				
			|||
                name: "Devices", | 
				
			|||
                newName: "device"); | 
				
			|||
 | 
				
			|||
            migrationBuilder.AddColumn<string>( | 
				
			|||
                name: "device_code", | 
				
			|||
                table: "device", | 
				
			|||
                type: "character varying(3)", | 
				
			|||
                maxLength: 3, | 
				
			|||
                nullable: true, | 
				
			|||
                comment: "设备编码"); | 
				
			|||
 | 
				
			|||
            migrationBuilder.AddColumn<char>( | 
				
			|||
                name: "device_image_type", | 
				
			|||
                table: "device", | 
				
			|||
                type: "character(1)", | 
				
			|||
                maxLength: 1, | 
				
			|||
                nullable: false, | 
				
			|||
                defaultValueSql: "'0'", | 
				
			|||
                comment: "仪器图片类型"); | 
				
			|||
 | 
				
			|||
            migrationBuilder.AddPrimaryKey( | 
				
			|||
                name: "PK_device", | 
				
			|||
                table: "device", | 
				
			|||
                column: "id"); | 
				
			|||
        } | 
				
			|||
 | 
				
			|||
        protected override void Down(MigrationBuilder migrationBuilder) | 
				
			|||
        { | 
				
			|||
            migrationBuilder.DropPrimaryKey( | 
				
			|||
                name: "PK_device", | 
				
			|||
                table: "device"); | 
				
			|||
 | 
				
			|||
            migrationBuilder.DropColumn( | 
				
			|||
                name: "device_code", | 
				
			|||
                table: "device"); | 
				
			|||
 | 
				
			|||
            migrationBuilder.DropColumn( | 
				
			|||
                name: "device_image_type", | 
				
			|||
                table: "device"); | 
				
			|||
 | 
				
			|||
            migrationBuilder.RenameTable( | 
				
			|||
                name: "device", | 
				
			|||
                newName: "Devices"); | 
				
			|||
 | 
				
			|||
            migrationBuilder.AddPrimaryKey( | 
				
			|||
                name: "PK_Devices", | 
				
			|||
                table: "Devices", | 
				
			|||
                column: "id"); | 
				
			|||
        } | 
				
			|||
    } | 
				
			|||
} | 
				
			|||
						Write
						Preview
					
					
					Loading…
					
					Cancel
						Save
					
		Reference in new issue