You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

62 lines
2.1 KiB

using System;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
namespace Mirle.Component.API.ProgrammableLogicController.Models
{
/// <summary>
/// 量測物料重量請求類別
/// </summary>
public class TP047MaterialWeightRequestDto : CommonMessage
{
/// <summary>
/// 站點編號
/// </summary>
[Required, StringLength(9), JsonPropertyName("station_id"), JsonPropertyOrder(101)]
public string StationID { get; set; }
/// <summary>
/// 取得量測物料重量請求
/// </summary>
/// <param name="transName">交易名稱</param>
/// <param name="softwareID">軟體編號</param>
/// <param name="stationID">站點編號</param>
/// <returns>量測物料重量請求</returns>
public static TP047MaterialWeightRequestDto Get(TransactionName transName, string softwareID, string stationID)
{
return new TP047MaterialWeightRequestDto()
{
Timetick = DateTime.Now,
TransactionName = transName.ToTransactionName(),
SoftwareID = softwareID,
StationID = stationID
};
}
}
/// <summary>
/// 量測物料重量回應類別
/// </summary>
public class FP048MaterialWeightResponseDto : CommonMessage
{
/// <summary>
/// 站點編號
/// </summary>
[Required, StringLength(9), JsonPropertyName("station_id"), JsonPropertyOrder(101)]
public string StationID { get; set; }
/// <summary>
/// 物料重量
/// </summary>
[Required, JsonPropertyName("material_weight"), JsonPropertyOrder(102)]
public int MaterialWeight { get; set; }
/// <summary>
/// 結果代碼
/// </summary>
/// <value>
/// 0 = Success <br/>
/// 1 = Too Light <br/>
/// 2 = Too Heavy <br/>
/// 3 = No Weight <br/>
/// </value>
[Required, JsonPropertyName("result_code"), JsonPropertyOrder(103)]
public MaterialInspectResultCode ResultCode { get; set; }
}
}