using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;

namespace  Models
{
    /// <summary>
    /// 房间设备信息表
    /// </summary>
    [Table("TBL_ROOM_DEV_INFO")]
    public class TBL_ROOM_DEV_INFO
    {
        /// <summary>
        /// 自增ID
        /// </summary>
        [Key, Column(TypeName = "int"), Comment("设备信息id,自增长"), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int DEV_INFO_ID { get; set; }

        /// <summary>
        /// 房间ID
        /// </summary>
        [Required, Column(TypeName = "nvarchar(20)"), Comment("房间ID")]
        public string ROOM_ID{ get; set; }
        
        /// <summary>
        /// 设备厂商
        /// </summary>
        [Required, Column(TypeName = "nvarchar(20)"), Comment("设备厂商")]
        public string DEV_BRAND { get; set; }

        /// <summary>
        /// 设备类型
        /// </summary>
        [Required, Column(TypeName = "nvarchar(20)"), Comment("设备类型")]
        public string DEV_TYPE_ID { get; set; }

        /// <summary>
        /// 设备SN
        /// </summary>
        [Required, Column(TypeName = "nvarchar(20)"), Comment("设备SN")]
        public string DEV_SN { get; set; }

        /// <summary>
        /// 设备MAC地址
        /// </summary>
        [Required, Column(TypeName = "nvarchar(20)"), Comment("设备MAC地址")]
        public string DEV_MAC { get; set; }

        /// <summary>
        /// 接口
        /// </summary>
        [Required, Column(TypeName = "nvarchar(20)"), Comment("接口")]
        public string INTERFACE { get; set; }

        /// <summary>
        /// 接口地址
        /// </summary>
        [Required, Column(TypeName = "nvarchar(100)"), Comment("接口地址")]
        public string INTERFACE_URL { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [Column(TypeName = "nvarchar(520)"), Comment("备注")]
        public string REMARK { get; set; }

        /// <summary>
        /// 记录更新时间
        /// </summary>
        [ Column(TypeName = "datetime"), DatabaseGenerated(DatabaseGeneratedOption.Computed)]
        public DateTime? UPDATE_TIMEMARK { get; set; }
    }
}
