self_mall_api/ARW.Model/Dto/Business/GoodsManager/Goodss/GoodsDto.cs

228 lines
5.5 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Reflection.Metadata.Ecma335;
using ARW.Model.Models.Business.GoodsManager.Goodss;
using Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure;
using MimeKit;
using OfficeOpenXml.Attributes;
namespace ARW.Model.Dto.Business.GoodsManager.Goodss
{
/// <summary>
/// 商品输入对象
///
/// @author lwh
/// @date 2023-06-19
/// </summary>
public class GoodsDto
{
public int GoodsId { get; set; }
public long GoodsGuid { get; set; }
public long ShopGuid { get; set; }
[Required(ErrorMessage = "商品类目guid不能为空")]
public long ShopGoodsCategoryGuid { get; set; }
public string GoodsSkuIds { get; set; }
public string GoodsServicesIds { get; set; }
/// <summary>
/// 商品规格
/// </summary>
public List<GoodsSpecDto> GoodsSpecList { get; set; }
/// <summary>
/// 商品sku列表
/// </summary>
public List<SkuDto> SkuList { get; set; }
[Required(ErrorMessage = "配送模板guid不能为空")]
public long DeliveryGuid { get; set; }
[Required(ErrorMessage = "名称不能为空")]
public string GoodsName { get; set; }
public string GoodsCoding { get; set; }
public string GoodsMainImageVideo { get; set; }
public string GoodsVideoCover { get; set; }
public string GoodsSellingPoint { get; set; }
public int GoodsSpecType { get; set; }
[Required(ErrorMessage = "图片不能为空")]
public string GoodsPicture { get; set; }
public decimal GoodsWeight { get; set; }
public decimal GoodsPriceLowest { get; set; }
[Required(ErrorMessage = "价格(最高)不能为空")]
public decimal GoodsPriceHighest { get; set; }
public decimal GoodsDashedPriceLowest { get; set; }
[Required(ErrorMessage = "划线价格(最高)不能为空")]
public decimal GoodsDashedPriceHighest { get; set; }
[Required(ErrorMessage = "库存总量不能为空")]
public int GoodsTotalInventory { get; set; }
[Required(ErrorMessage = "初始销量不能为空")]
public int GoodsSalesInitial { get; set; }
public int GoodsSalesActual { get; set; }
[Required(ErrorMessage = "详情不能为空")]
public string GoodsDetails { get; set; }
[Required(ErrorMessage = "库存计算方式不能为空")]
public int GoodsDeductStockType { get; set; }
[Required(ErrorMessage = "是否赠送积分不能为空")]
public int GoodsIsPointsGift { get; set; }
[Required(ErrorMessage = "是否允许使用积分抵扣不能为空")]
public int GoodsIsPointsDiscount { get; set; }
[Required(ErrorMessage = "积分抵扣设置不能为空")]
public int GoodsIsAlonePointsDiscount { get; set; }
public string GoodsPointsDiscountConfig { get; set; }
[Required(ErrorMessage = "是否开启会员折扣能为空")]
public int GoodsIsEnableGrade { get; set; }
[Required(ErrorMessage = "会员折扣设置不能为空")]
public int GoodsIsAloneGrade { get; set; }
public string GoodsAloneGradeEquity { get; set; }
[Required(ErrorMessage = "上下架状态不能为空")]
public int GoodsShelfStatus { get; set; }
[Required(ErrorMessage = "排序不能为空")]
public int GoodsSort { get; set; }
}
/// <summary>
///
/// @author lwh
/// @date 2023-06-28
/// 上下架对象
/// </summary>
public class GoodsShelfDto
{
public int GoodsShelfStatus { get; set; }
public string ids { get; set; }
}
/// <summary>
/// 商品查询对象
///
/// @author lwh
/// @date 2023-06-19
/// </summary>
public class GoodsQueryDto : PagerInfo
{
public long ShopGuid { get; set; }
public string ShopName { get; set; }
public long? GoodsCategoryGuid { get; set; }
public long? ShopGoodsCategoryGuid { get; set; }
public string GoodsName { get; set; }
public string GoodsCoding { get; set; }
public string ids { get; set; }
}
/// <summary>
/// 商品规格组对象
///
/// @author lwh
/// @date 2023-06-24
/// </summary>
public class GoodsSpecDto
{
public int SpecId { get; set; }
public string SpecName { get; set; }
public List<GoodsSpecValueDto> Props { get; set; }
}
/// <summary>
/// 商品规格值列表对象
///
/// @author lwh
/// @date 2023-06-24
/// </summary>
public class GoodsSpecValueDto
{
public int SpecId { get; set; }
public int SpecValueId { get; set; }
public string SpecValueName { get; set; }
}
/// <summary>
/// 商品sku列表对象
///
/// @author lwh
/// @date 2023-06-24
/// </summary>
public class SkuDto
{
public string SpecValue{ get; set; }
public string SpecSecondValue { get; set; }
public string SpecThirdValue { get; set; }
public long GoodsGuid { get; set; }
public string GoodsSkuImg { get; set; }
public decimal GoodsSkuPrice { get; set; }
public decimal GoodsSkuLinePrice { get; set; }
public int GoodsSkuStockNum { get; set; }
public decimal GoodsSkuWeight { get; set; }
public string GoodsSkuSkuCode { get;set; }
}
}