using Newtonsoft.Json;
using NPoco;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace JwKdsV.Entity.OrderPackage
{
[Serializable]
[JsonObject(MemberSerialization.OptIn)]
[TableName("pos_order")]
[PrimaryKey(new string[] { "id" }, AutoIncrement = false)]
public class ServiceOrder: BaseEntity
{
public ServiceOrder()
{
CreateUser = COMMONUSER;
CreateDate = DateTime.Now;
}
///
/// 订单ID
///
[JsonProperty(PropertyName = "orderId")]
[Column("orderId")]
public string OrderId { get; set; }
///
/// 订单编号
///
[JsonProperty(PropertyName = "tradeNo")]
[Column("tradeNo")]
public string TradeNo { get; set; }
///
/// 订单类型
///
[JsonProperty(PropertyName = "orderType")]
[Column("orderType")]
public OrderType OrderType { get; set; } = OrderType.堂食;
///
/// 订单序号
///
[JsonProperty(PropertyName = "orderNo")]
[Column("orderNo")]
public string OrderNo { get; set; }
///
/// pos编号
///
[JsonProperty(PropertyName = "posNo")]
[Column("posNo")]
public string PosNo { get; set; }
///
/// 桌号
///
[JsonProperty(PropertyName = "tableNo")]
[Column("tableNo")]
public string TableNo { get; set; }
///
/// 销售时间
///
[JsonProperty(PropertyName = "saleDate")]
[Column("saleDate")]
public string SaleDate { get; set; }
///
/// 人数
///
[JsonProperty(PropertyName = "people")]
[Column("people")]
public int People { get; set; }
///
/// 订单备注
///
[JsonProperty(PropertyName = "caution")]
[Column("caution")]
public string Caution { get; set; }
///
/// POS设定名称
///
[JsonProperty(PropertyName = "posName")]
[Column("posName")]
public string PosName { get; set; }
///
/// 商品列表
///
[JsonProperty(PropertyName = "items")]
[Ignore]
public List Items { get; set; }
}
///
/// 营业模式
///
public enum OrderType
{
堂食 = 0,
外带 = 1,
电话外卖 = 2,
餐桌 = 3,
美团外卖 = 4,
饿了么 = 5,
百度外卖 = 6,
微信点餐 = 7
}
[Serializable]
[JsonObject(MemberSerialization.OptIn)]
[TableName("pos_order_item")]
[PrimaryKey(new string[] { "id" }, AutoIncrement = false)]
public class ServiceOrderItem : BaseEntity
{
public ServiceOrderItem()
{
CreateUser = COMMONUSER;
CreateDate = DateTime.Now;
}
///
/// 服务中心订单ID
///
[JsonProperty(PropertyName = "serviceId")]
[Column("serviceId")]
public string ServiceId { get; set; }
///
/// itemID
///
[JsonProperty(PropertyName = "itemId")]
[Column("itemId")]
public string ItemId { get; set; }
///
/// 订单ID
///
[JsonProperty(PropertyName = "orderId")]
[Column("orderId")]
public string OrderId { get; set; }
///
/// 订单明细排序
///
[JsonProperty(PropertyName = "orderNo")]
[Column("orderNo")]
public int OrderNo { get; set; }
///
/// 订单编号
///
[JsonProperty(PropertyName = "tradeNo")]
[Column("tradeNo")]
public string TradeNo { get; set; }
///
/// 产品ID
///
[JsonProperty(PropertyName = "productId")]
[Column("productId")]
public string ProductId { get; set; }
///
/// 商品名称
///
[JsonProperty(PropertyName = "productName")]
[Column("productName")]
public string ProductName { get; set; }
///
/// 做法描述
///
[JsonProperty(PropertyName = "makeDesc")]
[Column("makeDesc")]
public string MakeDesc { get; set; }
///
/// 数量
///
[JsonProperty(PropertyName = "quantity")]
[Column("quantity")]
public decimal Quantity { get; set; }
///
/// 分类ID
///
[JsonProperty(PropertyName = "typeId")]
[Column("typeId")]
public string TypeId { get; set; }
///
/// 分类名称
///
[JsonProperty(PropertyName = "typeName")]
[Column("typeName")]
public string TypeName { get; set; }
///
/// 规格ID
///
[JsonProperty(PropertyName = "specId")]
[Column("specId")]
public string SpecId { get; set; }
///
/// 规格名称
///
[JsonProperty(PropertyName = "specName")]
[Column("specName")]
public string SpecName { get; set; }
///
/// 是否套菜 普通 = 1,套餐主 = 2,套餐明 = 3
///
[JsonProperty(PropertyName = "isSuit")]
[Column("isSuit")]
public int IsSuit { get; set; }
///
/// 销售时间
///
[JsonProperty(PropertyName = "saleDate")]
[Column("saleDate")]
public string SaleDate { get; set; }
///
/// 厨显显示时间
///
[JsonProperty(PropertyName = "chuxianDisplayTime")]
[Column("chuxianDisplayTime")]
public string ChuxianDisplayTime { get; set; }
///
/// 划菜设备
///
[JsonProperty(PropertyName = "huacaiDevice")]
[Column("huacaiDevice")]
public string HuacaiDevice { get; set; }
///
/// 制作时长(单位分钟)
///
[JsonProperty(PropertyName = "makeDuration")]
[Column("makeDuration")]
public int MakeDuration { get; set; }
///
/// 划菜临时标识
///
[JsonProperty(PropertyName = "huacaiTempSign")]
[Column("huacaiTempSign")]
public int HuacaiTempSign { get; set; }
///
/// 划菜时间
///
[JsonProperty(PropertyName = "huacaiTime")]
[Column("huacaiTime")]
public string HuacaiTime { get; set; }
///
/// 划菜操作同步至服务中心状态
///
[JsonProperty(PropertyName = "huacai2ServiceStatus")]
[Column("huacai2ServiceStatus")]
public int Huacai2ServiceStatus { get; set; }
///
/// 划菜操作同步至服务中心次数
///
[JsonProperty(PropertyName = "huacai2ServiceNum")]
[Column("huacai2ServiceNum")]
public int Huacai2ServiceNum { get; set; }
///
/// 同步划菜状态
///
[JsonProperty(PropertyName = "syncHuacaiStatus")]
[Column("syncHuacaiStatus")]
public int SyncHuacaiStatus { get; set; }
///
/// 出品显示时间
///
[JsonProperty(PropertyName = "chupinDisplayTime")]
[Column("chupinDisplayTime")]
public string ChupinDisplayTime { get; set; }
///
/// 出品设备
///
[JsonProperty(PropertyName = "chupinDevice")]
[Column("chupinDevice")]
public string ChupinDevice { get; set; }
///
/// 出品时长(单位分钟)
///
[JsonProperty(PropertyName = "chupinDuration")]
[Column("chupinDuration")]
public int ChupinDuration { get; set; }
///
/// 出品时间
///
[JsonProperty(PropertyName = "chupinTime")]
[Column("chupinTime")]
public string ChupinTime { get; set; }
///
/// 同步出品状态
///
[JsonProperty(PropertyName = "syncChupinStatus")]
[Column("syncChupinStatus")]
public int SyncChupinStatus { get; set; }
}
}