Files
WMS/HHWMS.Web/Models/Mqtt/MqttSubscription.cs
2026-03-07 17:01:46 +08:00

31 lines
1.0 KiB
C#

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; }
}
}