mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-04-01 06:36:37 +08:00
回滚main
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
public class brand:baseModel<int>
|
||||
{
|
||||
[Comment("品牌名称")]
|
||||
public string name { get; set; }
|
||||
[Comment("品牌图片")]
|
||||
public string image { get; set; }
|
||||
[Comment("品牌首字母")]
|
||||
public string letter { get; set; }
|
||||
[Comment("类别")]
|
||||
public List<category > categories { get; set; }
|
||||
[Comment("spu")]
|
||||
public List<spu> spus { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
public class category:baseModel<int>
|
||||
{
|
||||
[Comment("类别名称")]
|
||||
public string name { get; set; }
|
||||
[Comment("排序")]
|
||||
public int sort { get; set; }
|
||||
[Comment("是否父类别")]
|
||||
public int is_parent { get; set; }
|
||||
[Comment("子类别")]
|
||||
public List<category> chidrens { get; set; }
|
||||
[Comment("品牌")]
|
||||
public List<brand> brands { get; set; }
|
||||
[Comment("spu")]
|
||||
public List<spu> spus { get; set; }
|
||||
[Comment("规格组")]
|
||||
public List<spec_group> spec_Groups { get; set; }
|
||||
[Comment("规格")]
|
||||
public List<spec_param> spec_Params { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
public class order : baseModel<int>
|
||||
{
|
||||
[Comment("总金额,单位为分")]
|
||||
public int total_pay { get; set; }
|
||||
[Comment("实付金额。单位:分。如:20007,表示:200元7分")]
|
||||
public int actual_pay { get; set; }
|
||||
[Comment("支付类型,1、在线支付,2、货到付款")]
|
||||
public int payment_type { get; set; }
|
||||
[Comment("邮费。单位:分。如:20007,表示:200元7分")]
|
||||
public int post_fee { get; set; }
|
||||
[Comment("promotion_ids")]
|
||||
public string promotion_ids { get; set; }
|
||||
[Comment("订单创建时间")]
|
||||
public DateTime creat_time { get; set; }
|
||||
[Comment("物流名称")]
|
||||
public string shipping_name { get; set; }
|
||||
[Comment("物流单号")]
|
||||
public string shipping_code { get; set; }
|
||||
[Comment("买家留言")]
|
||||
public string buyer_message { get; set; }
|
||||
[Comment("买家昵称")]
|
||||
public string buyer_nick { get; set; }
|
||||
[Comment("买家是否已经评价,0未评价,1已评价")]
|
||||
public int buyer_rate { get; set; }
|
||||
[Comment("收获地址(省)")]
|
||||
public string receiver_state { get; set; }
|
||||
[Comment("收获地址(市)")]
|
||||
public string receiver_city { get; set; }
|
||||
[Comment("收获地址(区/县)")]
|
||||
public string receiver_district { get; set; }
|
||||
[Comment("收获地址(街道、住址等详细地址)")]
|
||||
public string receiver_address { get; set; }
|
||||
[Comment("收货人手机")]
|
||||
public string receiver_mobile { get; set; }
|
||||
[Comment("收货人邮编")]
|
||||
public string receiver_zip { get; set; }
|
||||
[Comment("收货人")]
|
||||
public string receiver { get; set; }
|
||||
[Comment("发票类型:0无发票1普通发票,2电子发票,3增值税发票")]
|
||||
public int invoice_type { get; set; }
|
||||
[Comment("订单来源:1:app端,2:pc端,3:M端,4:微信端,5:手机qq端")]
|
||||
public int source_type { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
public class sku : baseModel<int>
|
||||
{
|
||||
[Comment("商品标题")]
|
||||
public string title { get; set; }
|
||||
[Comment("商品的图片,多个图片以‘,’分割")]
|
||||
public string images { get; set; }
|
||||
[Comment("销售价格,单位为分")]
|
||||
public int price { get; set; }
|
||||
[Comment("特有规格属性在spu属性模板中的对应下标组合")]
|
||||
public string indexes { get; set; }
|
||||
[Comment("是否有效,0无效,1有效")]
|
||||
public int enable { get; set; }
|
||||
[Comment("sku的特有规格参数键值对,json格式,反序列化时请使用linkedHashMap,保证有序")]
|
||||
public string own_spec { get; set; }
|
||||
[Comment("创建时间")]
|
||||
public DateTime crate_time { get; set; }
|
||||
[Comment("最后更新时间")]
|
||||
public DateTime last_update_time { get; set; }
|
||||
[Comment("spu")]
|
||||
public spu spu { get; set; }
|
||||
[Comment("订单")]
|
||||
public List<order> orders { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
public class spec_group : baseModel<int>
|
||||
{
|
||||
[Comment("规格组名称")]
|
||||
public string name { get; set; }
|
||||
[Comment("类别")]
|
||||
public category category { get; set; }
|
||||
[Comment("规格")]
|
||||
public List<spec_param> spec_Params { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
public class spec_param:baseModel<int>
|
||||
{
|
||||
[Comment("参数名")]
|
||||
public string name { get; set; }
|
||||
[Comment("是否是数字类型参数,true或false")]
|
||||
public int numeric { get; set; }
|
||||
[Comment("数字类型参数的单位,非数字类型可以为空")]
|
||||
public string unit { get; set; }
|
||||
[Comment("是否是sku通用属性,true或false")]
|
||||
public int generic { get; set; }
|
||||
[Comment("是否用于搜索过滤,true或false")]
|
||||
public int searching { get; set; }
|
||||
[Comment("数值类型参数,如果需要搜索,则添加分段间隔值,如CPU频率间隔:0.5-1.0")]
|
||||
public string segments { get; set; }
|
||||
[Comment("规格组")]
|
||||
public spec_group spec_Group { get; set; }
|
||||
[Comment("类别")]
|
||||
public category category { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
public class spu : baseModel<int>
|
||||
{
|
||||
[Comment("标题")]
|
||||
public string title { get; set; }
|
||||
[Comment("子标题")]
|
||||
public string sub_title { get; set; }
|
||||
[Comment("是否上架")]
|
||||
public int saleable { get; set; }
|
||||
[Comment("是否有效")]
|
||||
public int valid { get; set; }
|
||||
[Comment("创建时间")]
|
||||
public DateTime crate_time { get; set; }
|
||||
[Comment("最后更新时间")]
|
||||
public DateTime last_update_time { get; set; }
|
||||
[Comment("类别")]
|
||||
public List<category> categories { get; set; }
|
||||
[Comment("品牌")]
|
||||
public brand brand { get; set; }
|
||||
[Comment("spu详情")]
|
||||
public spu_detail spu_Detail { get; set; }
|
||||
[Comment("skus")]
|
||||
public List<sku> skus { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
public class spu_detail : baseModel<int>
|
||||
{
|
||||
[Comment("描述")]
|
||||
public string description { get; set; }
|
||||
[Comment("通用规格参数数据")]
|
||||
public string generic_spec { get; set; }
|
||||
[Comment("特有规格参数及可选值信息,json格式")]
|
||||
public string special_spec { get; set; }
|
||||
[Comment("包装清单")]
|
||||
public string packing_list { get; set; }
|
||||
[Comment("售后服务")]
|
||||
public string after_service { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Model.Models
|
||||
{
|
||||
public class stock:baseModel<int>
|
||||
{
|
||||
[Comment("可秒杀库存")]
|
||||
public int seckill_stock { get; set; }
|
||||
[Comment("秒杀总数量")]
|
||||
public int seckill_total { get; set; }
|
||||
[Comment("库存数量")]
|
||||
public int stock_count { get; set; }
|
||||
[Comment("sku")]
|
||||
public sku sku { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
using Nest;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Model.Models;
|
||||
|
||||
namespace Yi.Framework.Model.Search
|
||||
{
|
||||
[ElasticsearchType(IdProperty = "id")]//主键声明,且主键必须是属性
|
||||
public class Goods
|
||||
{
|
||||
public long id { get; set; }
|
||||
|
||||
|
||||
public spu spu { get; set; }
|
||||
public string all; //所有需要被搜索的信息,包括品牌,分类,标题
|
||||
public string subtitle; //子标题
|
||||
public brand brand;
|
||||
public category cid1;
|
||||
public category cid2;
|
||||
public category cid3;
|
||||
public DateTime? createTime;
|
||||
|
||||
|
||||
public HashSet<double> price = new HashSet<double>(); //是所有sku的价格集合。方便根据价格进行筛选过滤
|
||||
public List<sku> skus; //sku信息的json结构数据
|
||||
public Dictionary<string, object> specs = new Dictionary<string, object>(); //可搜索的规格参数,key是参数名,值是参数值
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Model.Models;
|
||||
|
||||
namespace Yi.Framework.Model.Search
|
||||
{
|
||||
public class SearchResult<Goods> : PageResult<Goods>
|
||||
{
|
||||
public List<brand> brands = new List<brand>();
|
||||
public List<category> categories = new List<category>();
|
||||
//规格参数过滤条件
|
||||
public List<Dictionary<string, object>> specs = new List<Dictionary<string, object>>();
|
||||
public SearchResult(long total,
|
||||
int totalPage,
|
||||
List<Goods> items,
|
||||
List<category> categories,
|
||||
List<brand> brands,
|
||||
List<Dictionary<string, object>> specs) : base
|
||||
(total, items)
|
||||
{
|
||||
|
||||
this.categories = categories;
|
||||
this.brands = brands;
|
||||
this.specs = specs;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -8,18 +8,9 @@ namespace Yi.Framework.Model
|
||||
{
|
||||
public partial class DataContext :DbContext
|
||||
{
|
||||
public DbSet<brand> brand { get; set; }
|
||||
public DbSet<category> category { get; set; }
|
||||
public DbSet<menu> menu { get; set; }
|
||||
public DbSet<mould> mould { get; set; }
|
||||
public DbSet<order> order { get; set; }
|
||||
public DbSet<role> role { get; set; }
|
||||
public DbSet<sku> sku { get; set; }
|
||||
public DbSet<spec_group> spec_group { get; set; }
|
||||
public DbSet<spec_param> spec_param { get; set; }
|
||||
public DbSet<spu> spu { get; set; }
|
||||
public DbSet<spu_detail> spu_detail { get; set; }
|
||||
public DbSet<stock> stock { get; set; }
|
||||
public DbSet<user> user { get; set; }
|
||||
public DbSet<visit> visit { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user