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

namespace Atomx.Common.Entities
{
    /// <summary>
    /// 货币与支付通道关联表
    /// </summary>
    public class CurrencyChannelRelation
    {
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        [Key]
        public long Id { get; set; }

        /// <summary>
        /// 货币支付通道标题
        /// </summary>
        public string Title { get; set; } = string.Empty;

        /// <summary>
        /// 货币ID
        /// </summary>
        public int CurrencyId { get; set; }

        /// <summary>
        /// 支付通道ID
        /// </summary>
        public int PayChannelId { get; set; }

        /// <summary>
        /// 每天可用开始时间
        /// </summary>
        public int StartTime { get; set; }

        /// <summary>
        /// 每天可用暂停时间
        /// </summary>
        public int EndTime { get; set; }

        /// <summary>
        /// 每天可用时间的时区
        /// </summary>
        public int TimeZone { get; set; }

        /// <summary>
        /// 通道费率
        /// </summary>
        public decimal Rate { get; set; }

        /// <summary>
        /// 扩展信息
        /// </summary>
        [Column(TypeName = "text")]
        public string Extended { get; set; } = string.Empty;

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

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

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