10 changed files with 239 additions and 0 deletions
@ -0,0 +1,54 @@ |
|||||
|
using FreeSql.DataAnnotations; |
||||
|
using System; |
||||
|
|
||||
|
namespace SiNan.Model.Db |
||||
|
{ |
||||
|
|
||||
|
[Table(Name = "product", DisableSyncStructure = true)] |
||||
|
public partial class Product |
||||
|
{ |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// SPU
|
||||
|
/// </summary>
|
||||
|
[Column(StringLength = 50, IsPrimary = true, IsNullable = false)] |
||||
|
public string Id { get; set; } |
||||
|
|
||||
|
[Column(DbType = "datetime")] |
||||
|
public DateTime? CreateTime { get; set; } |
||||
|
|
||||
|
[Column(DbType = "int(1)", MapType = typeof(int))] |
||||
|
public Enums.Platform Platform { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 货号
|
||||
|
/// </summary>
|
||||
|
[Column(StringLength = 100)] |
||||
|
public string ProductItemNum { get; set; } |
||||
|
|
||||
|
|
||||
|
public long? ShopId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 标题
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public string Title { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 主SkuId
|
||||
|
/// </summary>
|
||||
|
[Column(StringLength = 50)] |
||||
|
public string MainSkuId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 京东商品状态【-1:删除 1:从未上架 2:自主下架 4:系统下架 8:上架 513:从未上架待审 514:自主下架待审 516:系统下架待审 520:上架待审核 1028:系统下架审核失败】
|
||||
|
/// </summary>
|
||||
|
public int? State { get; set; } |
||||
|
|
||||
|
[Column(MapType = typeof(int), DbType = "int")] |
||||
|
public Enums.Stage Stage { get; set; } = Enums.Stage.新品款; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,57 @@ |
|||||
|
using FreeSql.DataAnnotations; |
||||
|
using System; |
||||
|
|
||||
|
namespace SiNan.Model.Db |
||||
|
{ |
||||
|
|
||||
|
[Table(Name = "productsku", DisableSyncStructure = true)] |
||||
|
public partial class ProductSku |
||||
|
{ |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// SKU
|
||||
|
/// </summary>
|
||||
|
[Column(StringLength = 50, IsPrimary = true, IsNullable = false)] |
||||
|
public string Id { get; set; } |
||||
|
|
||||
|
[Column(DbType = "datetime")] |
||||
|
public DateTime? CreateTime { get; set; } |
||||
|
|
||||
|
|
||||
|
public string Logo { get; set; } |
||||
|
|
||||
|
[Column(DbType = "int(1)", MapType = typeof(int))] |
||||
|
public Enums.Platform Platform { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 售价
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(18,2)")] |
||||
|
public decimal? Price { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// SPU
|
||||
|
/// </summary>
|
||||
|
[Column(StringLength = 50)] |
||||
|
public string ProductId { get; set; } |
||||
|
|
||||
|
|
||||
|
public long? ShopId { get; set; } |
||||
|
|
||||
|
|
||||
|
public string Title { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 京东Sku状态【1:上架 2:下架 4:删除】
|
||||
|
/// </summary>
|
||||
|
public int? State { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 三级类目Id
|
||||
|
/// </summary>
|
||||
|
public int? CategoryId { get; set; } |
||||
|
|
||||
|
public string CategoryName { get; set; } |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,13 @@ |
|||||
|
namespace SiNan.Model.Dto.Request.Product |
||||
|
{ |
||||
|
public class SearchProductGOIRequestcs |
||||
|
{ |
||||
|
public string Spu { get; set; } |
||||
|
|
||||
|
public string Sku { get; set; } |
||||
|
|
||||
|
public string SpuTitle { get; set; } |
||||
|
|
||||
|
public Enums.Stage? Stage { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
namespace SiNan.Model.Dto |
||||
|
{ |
||||
|
public class GOIResponse |
||||
|
{ |
||||
|
public decimal Cost { get; set; } |
||||
|
|
||||
|
public decimal Profit { get; set; } |
||||
|
|
||||
|
public decimal GOI |
||||
|
{ |
||||
|
get |
||||
|
{ |
||||
|
return Cost == 0M ? 0M : Math.Round(Profit / Cost, 2); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,50 @@ |
|||||
|
namespace SiNan.Model.Dto |
||||
|
{ |
||||
|
public class ProductGOIResponse : ProductResponse |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 商品维度 昨日GOI
|
||||
|
/// </summary>
|
||||
|
public GOIResponse ProductGOI_Yestoday { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 商品维度 近7天GOI
|
||||
|
/// </summary>
|
||||
|
public GOIResponse ProductGOI_Recent7Day { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 商品维度 近30天GOI
|
||||
|
/// </summary>
|
||||
|
public GOIResponse ProductGOI_Recent30Day { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 推广维度 昨日GOI
|
||||
|
/// </summary>
|
||||
|
public GOIResponse PromotionGOI_Yestoday { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 推广维度 近7天GOI
|
||||
|
/// </summary>
|
||||
|
public GOIResponse PromotionGOI_Recent7Day { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 推广维度 近30天GOI
|
||||
|
/// </summary>
|
||||
|
public GOIResponse PromotionGOI_Recent30Day { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 累计花费
|
||||
|
/// </summary>
|
||||
|
public decimal TotalCost { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 累计亏损
|
||||
|
/// </summary>
|
||||
|
public decimal TotalDeficit { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 最大亏损
|
||||
|
/// </summary>
|
||||
|
public decimal MaxDeficit { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,12 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace SiNan.Model.Dto.Response.GOI |
||||
|
{ |
||||
|
internal class ProductSkuGOIResponse |
||||
|
{ |
||||
|
} |
||||
|
} |
@ -0,0 +1,6 @@ |
|||||
|
namespace SiNan.Model.Dto |
||||
|
{ |
||||
|
public class ProductResponse : Model.Db.Product |
||||
|
{ |
||||
|
} |
||||
|
} |
@ -0,0 +1,26 @@ |
|||||
|
namespace SiNan.Model |
||||
|
{ |
||||
|
public class Enums |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 商品阶段 新品款=0 成长款=1 日销款=2 TOP款=3 清仓款=4
|
||||
|
/// </summary>
|
||||
|
public enum Stage |
||||
|
{ |
||||
|
新品款 = 0, 成长款 = 1, 日销款 = 2, TOP款 = 3, 清仓款 = 4 |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 电商平台 淘宝 = 0,京东 = 1,阿里巴巴 = 2,拼多多 = 3,微信 = 4,拳探 = 10
|
||||
|
/// </summary>
|
||||
|
public enum Platform |
||||
|
{ |
||||
|
淘宝 = 0, |
||||
|
京东 = 1, |
||||
|
阿里巴巴 = 2, |
||||
|
拼多多 = 3, |
||||
|
微信 = 4, |
||||
|
拳探 = 10 |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,2 @@ |
|||||
|
|
||||
|
FreeSql.Generator -Razor 1 -NameOptions 1,0,0,0 -NameSpace SiNan.Server.Model.Db -DB "MySql,data source=rm-bp1508okrh23710yfao.mysql.rds.aliyuncs.com;port=3306;user id=qyroot;password=kaicn1132+-;initial catalog=mds;charset=utf8;sslmode=none;" -FileName "{name}.cs" |
@ -0,0 +1,2 @@ |
|||||
|
|
||||
|
FreeSql.Generator -Razor 1 -NameOptions 1,0,0,0 -NameSpace SiNan.Model.Db -DB "MySql,data source=rm-bp1508okrh23710yfao.mysql.rds.aliyuncs.com;port=3306;user id=qyroot;password=kaicn1132+-;initial catalog=bbwyb;charset=utf8;sslmode=none;" -FileName "{name}.cs" |
Loading…
Reference in new issue