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

namespace Atomx.Common.Entities
{
    [Table("OrderLogs")]
    public class OrderLog
    {
        /// <summary>
        /// 日志数据ID
        /// </summary>
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        [Key]
        public long Id { get; set; }

        /// <summary>
        /// 订单ID
        /// </summary>
        public long OrderId { get; set; }

        /// <summary>
        /// 产生动作的用户ID
        /// </summary>
        public long? Operator { get; set; }

        /// <summary>
        /// 日志类型
        /// </summary>
        public int? Type { get; set; }

        /// <summary>
        /// 订单状态
        /// </summary>
        public int OrderStatus { get; set; }

        /// <summary>
        /// 备注说明
        /// </summary>
        [Column(TypeName = "varchar(300)")]
        public string Remark { get; set; } = string.Empty;

        /// <summary>
        /// 操作IP
        /// </summary>
        [Column(TypeName = "varchar(50)")]
        public string Ip { get; set; } = string.Empty;

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