using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DH.Commons.Models
{
    public class CameraSummary
    {
        public string CameraName { get; set; }       // 相机名称
        public int TiggerCount { get; set; }            //触发数
        public int OKCount { get; set; }            // OK 数
        public int NGCount { get; set; }            // NG 数
        public int TotalCount => OKCount + NGCount;  // 总检测数量
        public string YieldStr => $"{Yield:f2} %";  // 良率(字符串形式)
        public double Yield => OKCount + NGCount > 0 ? (double)OKCount / (OKCount + NGCount) * 100 : 0;
    }

    public class ProductSummary
    {
        public int ProductAmount { get; set; }
        public string ResultDesc { get; set; }
        public string PercentStr { get; set; }
    }
}