You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

324 lines
8.6 KiB
C#

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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