using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Atomx.Common.Entities
{
    public class PaymentChannel
    {
        /// <summary>
        /// 数据ID
        /// </summary>
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        [Key]
        public int Id { get; set; }

        /// <summary>
        /// 付款方式,银行、微信、支付宝，USDT
        /// </summary>
        public int Type { get; set; }

        /// <summary>
        /// 支付网络，区块链-TRC20，Online-Wechat，Bank-ICBC
        /// </summary>
        public int Network { get; set; }

        /// <summary>
        /// 支付渠道名称
        /// </summary>
        [Column(TypeName = "varchar(20)")]
        public string Name { get; set; } = string.Empty;

        /// <summary>
        /// 支付渠道标题名称
        /// </summary>
        [Column(TypeName = "varchar(20)")]
        public string Title { get; set; }=string.Empty;

        /// <summary>
        /// 描述说明
        /// </summary>
        [Column(TypeName = "varchar(512)")]
        public string Description { get; set; } = string.Empty;


        /// <summary>
        /// 收款账号
        /// </summary>
        [Column(TypeName = "varchar(255)")]
        public string Account { get; set; } = string.Empty;

        /// <summary>
        /// 支付通道的设置
        /// </summary>
        [Column(TypeName = "text")]
        public string Config { get; set; } = string.Empty;

        /// <summary>
        /// 排序
        /// </summary>
        public int DisplayOrder { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        public int Status { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Column(TypeName = "timestamptz")]
        public DateTime CreateTime { get; set; } = DateTime.UtcNow;

        /// <summary>
        /// 更新时间
        /// </summary>
        [Column(TypeName = "timestamptz")]
        public DateTime? UpdateTime { get; set; }
    }
}
