using SqlSugar;

namespace YBDevice.Entity
{
    /// <summary>
    /// 设备订单,适用于扫码关注流程
    /// </summary>
    [SugarTable("YB_Order", TableDescription = "设备订单,适用于扫码关注流程", IsDisabledUpdateAll = false, IsDisabledDelete = true)]
    public class YB_Order
    {
        /// <summary>
        /// 
        /// </summary>
        [SugarColumn(IsPrimaryKey = true)]
        public System.Guid Id { get; set; }

        /// <summary>
        /// 订单名称
        /// </summary>
        [SugarColumn(ColumnDescription = "订单名称",ColumnDataType ="nvarchar(50)")]
        public System.String Name { get; set; }

        /// <summary>
        /// 内容类型,1-公众号,2-链接,3-小程序
        /// </summary>
        [SugarColumn(ColumnDescription = "内容类型,1-公众号,2-链接,3-小程序")]
        public OrderType Type { get; set; }
        /// <summary>
        /// 订单类型,1-设备管理,2-用户测量
        /// </summary>
        [SugarColumn(ColumnDescription = "订单类型,1-设备管理,2-用户测量",DefaultValue ="2",IsNullable =true)]
        public OrderBindType OrderType { get; set; }

        /// <summary>
        /// 链接或者公众号appid
        /// </summary>
        [SugarColumn(ColumnDescription = "链接或者公众号appid", ColumnDataType = "varchar(200)")]
        public System.String Url { get; set; }

        /// <summary>
        /// 当为小程序时的跳转页面地址
        /// </summary>
        [SugarColumn(ColumnDescription = "当为小程序时的跳转页面地址", ColumnDataType = "varchar(100)")]
        public System.String Page { get; set; }

        /// <summary>
        /// 实时关注/点击数
        /// </summary>
        [SugarColumn(ColumnDescription = "实时关注/点击数")]
        public System.Int32 RealCount { get; set; }

        /// <summary>
        /// 累计展现次数
        /// </summary>
        [SugarColumn(ColumnDescription = "累计展现次数")]
        public System.Int32 ShowCount { get; set; }

        /// <summary>
        /// 总数,为0则无上限
        /// </summary>
        [SugarColumn(ColumnDescription = "总数,为0则无上限")]
        public System.Int32 TotalCount { get; set; }

        /// <summary>
        /// 今日展现数量
        /// </summary>
        [SugarColumn(ColumnDescription = "今日展现数量")]
        public System.Int32 DayCount { get; set; }

        /// <summary>
        /// 今日实际关注/点击数
        /// </summary>
        [SugarColumn(ColumnDescription = "今日实际关注/点击数")]
        public System.Int32 DayRealCount { get; set; }

        /// <summary>
        /// 日上限,为0则没有上限
        /// </summary>
        [SugarColumn(ColumnDescription = "日上限,为0则没有上限")]
        public System.Int32 DayLimit { get; set; }

        /// <summary>
        /// 开始时间,为空则马上开始
        /// </summary>
        [SugarColumn(ColumnDescription = "开始时间,为空则马上开始", IsNullable = true)]
        public System.DateTime? StartTime { get; set; }

        /// <summary>
        /// 结束时间,为空则不会结束
        /// </summary>
        [SugarColumn(ColumnDescription = "结束时间,为空则不会结束", IsNullable = true)]
        public System.DateTime? EndTime { get; set; }

        /// <summary>
        /// 订单状态,1-正常,2-暂停,3-已完成,4-已取消
        /// </summary>
        [SugarColumn(ColumnDescription = "订单状态,1-正常,2-暂停,3-已完成,4-已取消")]
        public OrderStatus Status { get; set; }

        /// <summary>
        /// 状态备注
        /// </summary>
        [SugarColumn(ColumnDescription = "状态备注")]
        public System.String StatusRemark { get; set; }

        /// <summary>
        /// 优先级,数字越大越先被取到
        /// </summary>
        [SugarColumn(ColumnDescription = "优先级,数字越大越先被取到")]
        public System.Int32 Priority { get; set; }

        /// <summary>
        /// 商户ID
        /// </summary>
        [SugarColumn(ColumnDescription = "商户ID")]
        public System.Int32 BusinessId { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(ColumnDescription = "创建时间")]
        public System.DateTime CreateTime { get; set; }
    }
}
