刘磊
2025-04-19 bd02cb3fa0fa75ffafb2cf17501929b1b1e0029b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#region << 版 本 注 释 >>
/*----------------------------------------------------------------
 * 命名空间:WIDESEAWCS_QuartzJob
 * 创建者:胡童庆
 * 创建时间:2024/8/2 16:13:36
 * 版本:V1.0.0
 * 描述:设备信息实体
 *
 * ----------------------------------------------------------------
 * 修改人:
 * 修改时间:
 * 版本:V1.0.1
 * 修改说明:
 * 
 *----------------------------------------------------------------*/
#endregion << 版 本 注 释 >>
 
using Magicodes.ExporterAndImporter.Core;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Core.DB.Models;
 
namespace WIDESEAWCS_QuartzJob.Models
{
    /// <summary>
    /// 设备信息
    /// </summary>
    [SugarTable(nameof(Dt_DeviceInfo), "设备信息")]
    public class Dt_DeviceInfo : BaseEntity
    {
        /// <summary>
        /// 主键
        /// </summary>
        [ImporterHeader(IsIgnore = true)]
        [ExporterHeader(DisplayName = "主键")]
        [SugarColumn(IsIdentity = true, IsPrimaryKey = true, ColumnDescription = "主键")]
        public int Id { get; set; }
 
        /// <summary>
        /// 设备编号
        /// </summary>
        [ImporterHeader(Name = "设备编号")]
        [ExporterHeader(DisplayName = "设备编号")]
        [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "设备编号")]
        public string DeviceCode { get; set; }
 
        /// <summary>
        /// 设备名称
        /// </summary>
        [ImporterHeader(Name = "设备名称")]
        [ExporterHeader(DisplayName = "设备名称")]
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "设备名称")]
        public string DeviceName { get; set; }
 
        /// <summary>
        /// 设备类型
        /// </summary>
        [ImporterHeader(Name = "设备类型")]
        [ExporterHeader(DisplayName = "设备类型")]
        [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "设备类型")]
        public string DeviceType { get; set; }
 
        /// <summary>
        /// 设备状态
        /// </summary>
        [ImporterHeader(Name = "设备状态")]
        [ExporterHeader(DisplayName = "设备状态")]
        [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "设备状态")]
        public string DeviceStatus { get; set; }
 
        /// <summary>
        /// 设备IP
        /// </summary>
        [ImporterHeader(Name = "设备IP")]
        [ExporterHeader(DisplayName = "设备IP")]
        [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "设备IP")]
        public string DeviceIp { get; set; }
 
        /// <summary>
        /// 设备端口
        /// </summary>
        [ImporterHeader(Name = "设备端口")]
        [ExporterHeader(DisplayName = "设备端口")]
        [SugarColumn(IsNullable = false, ColumnDescription = "设备端口")]
        public int DevicePort { get; set; }
 
        /// <summary>
        /// PLC类型
        /// </summary>
        [ImporterHeader(Name = "PLC类型")]
        [ExporterHeader(DisplayName = "PLC类型")]
        [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "PLC类型")]
        public string DevicePlcType { get; set; }
 
        /// <summary>
        /// 备注
        /// </summary>
        [ImporterHeader(Name = "备注")]
        [ExporterHeader(DisplayName = "备注")]
        [SugarColumn(Length = 200, IsNullable = true, ColumnDescription = "备注")]
        public string DeviceRemark { get; set; }
 
        /// <summary>
        /// 设备协议集合
        /// </summary>
        [ImporterHeader(IsIgnore =true)]
        [ExporterHeader(IsIgnore = true)]
        [Navigate(NavigateType.OneToMany, nameof(Dt_DeviceProtocol.DeviceId), nameof(Id)), SugarColumn(IsIgnore = true, IsNullable = true)]
        public List<Dt_DeviceProtocol> ProtocolList { get; set; }
    }
}