mqtt 1
This commit is contained in:
1 parent
17b3236989
commit
55cce81912
8 files changed
+266
-8
No files matched your search
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
|
||||
namespace HHWMS.Web.Models
|
||||
{
|
||||
[Table("MqttMessageRecord")]
|
||||
public class MqttMessageRecord : BasePoco
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public new int ID { get; set; }
|
||||
|
||||
[Display(Name = "Mqtt.Topic", Description = "主题")]
|
||||
[StringLength(200, ErrorMessage = "Validate.{0}stringmax{1}")]
|
||||
public string Topic { get; set; }
|
||||
|
||||
[Display(Name = "Mqtt.Payload", Description = "消息内容")]
|
||||
public string Payload { get; set; }
|
||||
|
||||
[Display(Name = "Mqtt.ReceiveTime", Description = "接收时间")]
|
||||
public DateTime ReceiveTime { get; set; }
|
||||
|
||||
[Display(Name = "Mqtt.IsProcessed", Description = "是否已处理")]
|
||||
public bool IsProcessed { get; set; }
|
||||
|
||||
[Display(Name = "Mqtt.ProcessTime", Description = "处理时间")]
|
||||
public DateTime? ProcessTime { get; set; }
|
||||
|
||||
[Display(Name = "Mqtt.ProcessResult", Description = "处理结果")]
|
||||
public string ProcessResult { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
|
||||
namespace HHWMS.Web.Models
|
||||
{
|
||||
[Table("MqttSubscription")]
|
||||
public class MqttSubscription : BasePoco
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public new int ID { get; set; }
|
||||
|
||||
[Display(Name = "Mqtt.Topic", Description = "订阅主题")]
|
||||
[StringLength(200, ErrorMessage = "Validate.{0}stringmax{1}")]
|
||||
[Required(ErrorMessage = "Validate.{0}required")]
|
||||
public string Topic { get; set; }
|
||||
|
||||
[Display(Name = "Mqtt.Qos", Description = "服务质量(0,1,2)")]
|
||||
public int Qos { get; set; }
|
||||
|
||||
[Display(Name = "Mqtt.IsEnabled", Description = "是否启用")]
|
||||
public bool IsEnabled { get; set; }
|
||||
|
||||
[Display(Name = "Mqtt.Remark", Description = "备注")]
|
||||
[StringLength(500, ErrorMessage = "Validate.{0}stringmax{1}")]
|
||||
public string Remark { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user