// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#nullable disable
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using PVDEMCS.Services.Repositories.Entities.BaseEntity;

namespace PVDEMCS.Services.Repositories.Entities;

/// <summary>
/// PLC点位
/// </summary>
[Table("device_point")]
public partial class DevicePointEntity : CUDBaseEntity
{

    /// <summary>
    /// 控制器Id
    /// </summary>
    [Required]
    [Column("device_id")]
    [StringLength(64)]
    public string DeviceId { get; set; }

    /// <summary>
    /// 设备Id
    /// </summary>
    [Required]
    [Column("equipment_id")]
    [StringLength(64)]
    public string EquipmentId { get; set; }

    /// <summary>
    /// 点位编号
    /// </summary>
    [Required]
    [Column("point_code")]
    [StringLength(32)]
    public string PointCode { get; set; }

    /// <summary>
    /// 点位名称
    /// </summary>
    [Required]
    [Column("point_name")]
    [StringLength(32)]
    public string PointName { get; set; }

    /// <summary>
    /// S7 数据存储地址，直连 存储区地址
    /// </summary>
    [Required]
    [Column("address")]
    [StringLength(64)]
    public string Address { get; set; }

    /// <summary>
    /// 字段类型
    /// </summary>
    [Required]
    [Column("data_type")]
    [StringLength(32)]
    public string DataType { get; set; }

    /// <summary>
    /// 点位所属动作，启动停止：start_stop；故障：fault
    /// </summary>
    [Required]
    [Column("action_type")]
    [StringLength(32)]
    public string ActionType { get; set; }

    /// <summary>
    /// PLC 点位是否启用 (1 启用, 0 禁用)
    /// </summary>
    [Column("activated", TypeName = "bit(1)")]
    public bool Activated { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    [Column("remark")]
    [StringLength(255)]
    public string Remark { get; set; }

}