using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Newtonsoft.Json;
using NPoco;
namespace POSV.Entity
{
[Serializable]
[JsonObject(MemberSerialization.OptIn)]
[TableName("pos_store_info")]
[PrimaryKey(new string[] { "id" }, AutoIncrement = false)]
public class StoreInfo : BaseEntity
{
public StoreInfo()
{
}
///
/// 租户ID
///
[JsonProperty(PropertyName = "tenantId")]
[Column("tenantId")]
public string TenantId { get; set; }
///
/// 门店编号
///
[JsonProperty(PropertyName = "no")]
[Column("no")]
public string No { get; set; }
///
/// 门店名称
///
[JsonProperty(PropertyName = "name")]
[Column("name")]
public string Name { get; set; }
///
/// 负责人
///
[JsonProperty(PropertyName = "manager")]
[Column("manager")]
public string Manager { get; set; }
///
/// 联系电话
///
[JsonProperty(PropertyName = "tel")]
[Column("telphone")]
public string Telphone { get; set; }
///
/// 手机号码
///
[JsonProperty(PropertyName = "mobile")]
[Column("mobile")]
public string Mobile { get; set; }
///
/// 订餐电话
///
[JsonProperty(PropertyName = "orderTel")]
[Column("orderTel")]
public string OrderTel { get; set; }
private string _PrintName;
///
/// 打印名称
///
[JsonProperty(PropertyName = "printName")]
[Column("printName")]
public string PrintName
{
get
{
return string.IsNullOrEmpty(_PrintName) ? this.Name : _PrintName;
}
set
{
_PrintName = value;
}
}
///
/// 地址
///
[JsonProperty(PropertyName = "address")]
[Column("address")]
public string Address { get; set; }
///
/// 电子邮箱
///
[JsonProperty(PropertyName = "mail")]
[Column("mail")]
public string Mail { get; set; }
///
/// 是否按主食统计人数(0否1是)
///
[JsonProperty(PropertyName = "stapleFlag")]
[Column("stapleFlag")]
public int StapleFlag { get; set; }
///
/// 图片宽度
///
[JsonProperty(PropertyName = "width")]
[Column("width")]
public int Width { get; set; }
///
/// 图片高度
///
[JsonProperty(PropertyName = "height")]
[Column("height")]
public int Height { get; set; }
///
/// 存储组名
///
[JsonProperty(PropertyName = "groupName")]
[Column("groupName")]
public string GroupName { get; set; }
///
/// 存储文件名
///
[JsonProperty(PropertyName = "storageFileName")]
[Column("storageFileName")]
public string StorageFileName { get; set; }
///
/// 文件服务器地址
///
[JsonProperty(PropertyName = "dfsAccessDomain")]
[Column("dfsAccessDomain")]
public string DfsAccessDomain { get; set; }
///
/// 最大离线天数
///
[JsonProperty(PropertyName = "maxOffLine")]
[Column("maxOffLine")]
public int MaxOffLine { get; set; }
///
/// 计费模式
///
[JsonProperty(PropertyName = "costMode")]
[Column("costMode")]
public int CostMode { get; set; }
///
/// 到期时间
///
[JsonProperty(PropertyName = "dueDate")]
[Column("dueDate")]
public string DueDate { get; set; }
///
/// 是否启用门店税率
///
[JsonProperty(PropertyName = "storeTaxRateFlag")]
[Column("storeTaxRateFlag")]
public int StoreTaxRateFlag { get; set; } = 0;
///
/// 销项税
///
[JsonProperty(PropertyName = "saleTax")]
[Column("saleTax")]
public decimal SaleTax { get; set; } = 0.0M;
///
/// 联营扣率
///
[JsonProperty(PropertyName = "lyRate")]
[Column("lyRate")]
public decimal LyRate { get; set; } = 0.0M;
///
/// 门店扣点
///
[JsonProperty(PropertyName = "storeRate")]
[Column("storeRate")]
public decimal StoreRate { get; set; } = 0.0M;
///
/// 扩展字段1- subin add 20230915启用,用与通联支付中付款账号、商户号、收款账号的json配置
///
[JsonProperty(PropertyName = "ext1")]
[Column("ext1")]
public string Ext1 { get; set; }
///
/// 扩展字段2
///
[JsonProperty(PropertyName = "ext2")]
[Column("ext2")]
public string Ext2 { get; set; }
///
/// 扩展字段3
///
[JsonProperty(PropertyName = "ext3")]
[Column("ext3")]
public string Ext3 { get; set; }
///
/// 文件服务器下载地址
///
[JsonProperty(PropertyName = "url")]
[Ignore]
public string Url
{
get
{
var url = string.Format("{0}/{1}/{2}", this.DfsAccessDomain, this.GroupName, this.StorageFileName);
return url;
}
}
///
/// 支付参数
///
[JsonProperty(PropertyName = "pbody")]
[SerializedColumn("pbody")]
public Dictionary Body { get; set; }
///
/// 美团券核销Key
///
[JsonProperty(PropertyName = "meituanAppKey")]
[Ignore]
public string MeituanAppKey
{
get
{
if(Body != null && Body.ContainsKey("meituanAppKey"))
{
return Convert.ToString(Body["meituanAppKey"]);
}
return "";
}
}
///
/// 美团券核销Secret
///
[JsonProperty(PropertyName = "meituanAppSecret")]
[Ignore]
public string MeituanAppSecret
{
get
{
if (Body != null && Body.ContainsKey("meituanAppSecret"))
{
return Convert.ToString(Body["meituanAppSecret"]);
}
return "";
}
}
//#region subin 2023-07-01 增加通联付款方的userid
/////
///// 门店的付款方的userid
///// 由平台分配的会员Id
/////
//[JsonProperty(PropertyName = "payuserid")]
//[Ignore]
//public string Payuserid
//{
// get
// {
// var url = string.Format("ZH_OUT_{0}_{1}", this.TenantId, this.Id);
// return url;
// }
//}
//#endregion
}
#region subin 20230917 新增通联支付相关配置参数
[Serializable]
[JsonObject(MemberSerialization.OptIn)]
public class StoreAllinParams
{
///
/// 付款账号
///
[JsonProperty(PropertyName = "payuserid")]
public string PayuserId { get; set; }
///
/// 商户号id
///
[JsonProperty(PropertyName = "vspCusid")]
public string VspCusid { get; set; }
///
/// 商户号名称
///
[JsonProperty(PropertyName = "vspCusname")]
public string VspCusname { get; set; }
///
/// 收款方编号
///
[JsonProperty(PropertyName = "bizUserId")]
public string BizUserId { get; set; }
}
#endregion
}