mirror of https://github.com/EasyAbp/EShop.git
31 changed files with 5401 additions and 73 deletions
@ -1,13 +0,0 @@ |
|||
using System; |
|||
using Volo.Abp; |
|||
|
|||
namespace EasyAbp.EShop.Products.Products |
|||
{ |
|||
public class ProductDetailHasBeenUsedException : BusinessException |
|||
{ |
|||
public ProductDetailHasBeenUsedException(Guid productDetailId) : base(ProductsErrorCodes.ProductDetailHasBeenUsed) |
|||
{ |
|||
WithData(nameof(productDetailId), productDetailId); |
|||
} |
|||
} |
|||
} |
|||
File diff suppressed because it is too large
@ -0,0 +1,70 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
#nullable disable |
|||
|
|||
namespace EShopSample.Migrations |
|||
{ |
|||
public partial class MadeProductDetailIdNullable : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.AlterColumn<Guid>( |
|||
name: "ProductDetailId", |
|||
table: "EasyAbpEShopProductsProductViews", |
|||
type: "uniqueidentifier", |
|||
nullable: true, |
|||
oldClrType: typeof(Guid), |
|||
oldType: "uniqueidentifier"); |
|||
|
|||
migrationBuilder.AlterColumn<Guid>( |
|||
name: "ProductDetailId", |
|||
table: "EasyAbpEShopProductsProducts", |
|||
type: "uniqueidentifier", |
|||
nullable: true, |
|||
oldClrType: typeof(Guid), |
|||
oldType: "uniqueidentifier"); |
|||
|
|||
migrationBuilder.AlterColumn<DateTime>( |
|||
name: "ProductDetailModificationTime", |
|||
table: "EasyAbpEShopOrdersOrderLines", |
|||
type: "datetime2", |
|||
nullable: true, |
|||
oldClrType: typeof(DateTime), |
|||
oldType: "datetime2"); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.AlterColumn<Guid>( |
|||
name: "ProductDetailId", |
|||
table: "EasyAbpEShopProductsProductViews", |
|||
type: "uniqueidentifier", |
|||
nullable: false, |
|||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"), |
|||
oldClrType: typeof(Guid), |
|||
oldType: "uniqueidentifier", |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<Guid>( |
|||
name: "ProductDetailId", |
|||
table: "EasyAbpEShopProductsProducts", |
|||
type: "uniqueidentifier", |
|||
nullable: false, |
|||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"), |
|||
oldClrType: typeof(Guid), |
|||
oldType: "uniqueidentifier", |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<DateTime>( |
|||
name: "ProductDetailModificationTime", |
|||
table: "EasyAbpEShopOrdersOrderLines", |
|||
type: "datetime2", |
|||
nullable: false, |
|||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), |
|||
oldClrType: typeof(DateTime), |
|||
oldType: "datetime2", |
|||
oldNullable: true); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue