searchmodel
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user