using MadRunFabric.Common;
using MongoDB.Bson.Serialization.Attributes;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace MadRunFabric.Model
{
    /// <summary>
    /// App版本信息
    /// </summary>
    public class App_ApplicationsVersion : IBaseModel<string>
    {
        /// <summary>
        /// id
        /// </summary>
        [Key]
        [BsonRepresentation(MongoDB.Bson.BsonType.ObjectId)]
        public string id { get; set; }
        /// <summary>
        /// 应用分类（1android 2ios）
        /// </summary>
        public int apptype { get; set; } = 0;
        /// <summary>
        /// 版本名称
        /// </summary>
        public string versionname { get; set; }
        /// <summary>
        /// 版本号
        /// </summary>
        public string versioncode { get; set; }
        /// <summary>
        /// 下载地址
        /// </summary>
        public List<FileBaseModel> downurl { get; set; }
        /// <summary>
        /// 链接地址
        /// </summary>
        public string httpurl { get; set; }
        /// <summary>
        /// 用户id
        /// </summary>
        public string createby { get; set; }
        /// <summary>
        /// 添加时间
        /// </summary>
        public DateTime createtime
        {
            get
            {
                return _createtime.ToLocalTime();
            }
            set
            {
                _createtime = value.ToLocalTime();
            }
        }
        private DateTime _createtime;
        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime updatetime
        {
            get
            {
                return _updatetime.ToLocalTime();
            }
            set
            {
                _updatetime = value.ToLocalTime();
            }
        }
        private DateTime _updatetime;
        /// <summary>
        /// 删除时间
        /// </summary>
        public DateTime deletetime
        {
            get
            {
                return _deletetime.ToLocalTime();
            }
            set
            {
                _deletetime = value.ToLocalTime();
            }
        }
        private DateTime _deletetime;
        /// <summary>
        /// 是否删除 0正常 -1删除
        /// </summary>
        public int isdelete { get; set; } = 0;
        /// <summary>
        /// 排序
        /// </summary>
        public int ordernum { get; set; } = 0;
        /// <summary>
        /// 备注
        /// </summary>
        public string note { get; set; }
    }
}
