mirror of https://github.com/EasyAbp/EShop.git
committed by
GitHub
49 changed files with 10901 additions and 197 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); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,23 @@ |
|||
using System; |
|||
using System.ComponentModel.DataAnnotations; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form; |
|||
|
|||
namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.ProductSku.ViewModels |
|||
{ |
|||
public class CreateEditSkuProductDetailViewModel |
|||
{ |
|||
[HiddenInput] |
|||
public Guid? StoreId { get; set; } |
|||
|
|||
[TextArea(Rows = 4)] |
|||
[Display(Name = "ProductDetailDescription")] |
|||
[Placeholder("ProductSkuProductDetailDescriptionPlaceholder")] |
|||
public string Description { get; set; } |
|||
|
|||
public bool HasContent() |
|||
{ |
|||
return !Description.IsNullOrEmpty(); |
|||
} |
|||
} |
|||
} |
|||
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); |
|||
} |
|||
} |
|||
} |
|||
File diff suppressed because it is too large
@ -0,0 +1,26 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
#nullable disable |
|||
|
|||
namespace EShopSample.Migrations |
|||
{ |
|||
public partial class AddedProductDetailIdToOrderLine : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.AddColumn<Guid>( |
|||
name: "ProductDetailId", |
|||
table: "EasyAbpEShopOrdersOrderLines", |
|||
type: "uniqueidentifier", |
|||
nullable: true); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropColumn( |
|||
name: "ProductDetailId", |
|||
table: "EasyAbpEShopOrdersOrderLines"); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue