using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Newtonsoft.Json;
using ZR.Model.Models;

namespace ZR.Model.Dto.InStore
{
    /// <summary>
    /// 入库管理/入库记录表查询对象
    /// </summary>
    public class InInstoreRecordQueryDto : PagerInfo
    {
        public string InspectNo { get; set; }
        public string DeliverNo { get; set; }
        public string BomNo { get; set; }
        public string MaterialCode { get; set; }
        public string MaterialName { get; set; }
        public string MaterialSpec { get; set; }
        public string Category { get; set; }
        public int? Result { get; set; }
        public DateTime? BeginTime { get; set; }
        public DateTime? EndTime { get; set; }
        public string BnSnCode { get; set; }

    }

    /// <summary>
    /// 入库管理/入库记录表输入输出对象
    /// </summary>
    public class InInstoreRecordDto
    {
        [Required(ErrorMessage = "入库记录Id不能为空")]
        public int InStoreId { get; set; }

        [Required(ErrorMessage = "入库记录单号（流水号，用于记录每一次的入库操作）不能为空")]
        public string InStoreNo { get; set; }

        [Required(ErrorMessage = "质检记录单号不能为空")]
        public string InspectNo { get; set; }

        [Required(ErrorMessage = "交验单号不能为空")]
        public string DeliverNo { get; set; }

        [Required(ErrorMessage = "生产令号不能为空")]
        public string BomNo { get; set; }

        [Required(ErrorMessage = "物料编码不能为空")]
        public string MaterialCode { get; set; }

        [Required(ErrorMessage = "物料名称不能为空")]
        public string MaterialName { get; set; }

        [Required(ErrorMessage = "物料规格不能为空")]
        public string MaterialSpec { get; set; }

        [Required(ErrorMessage = "类别不能为空")]
        public string Category { get; set; }

        [Required(ErrorMessage = "关键件标识（0非关键件，1关键件）不能为空")]
        public bool KeyFlag { get; set; }

        public int? InStoreQty { get; set; }

        [Required(ErrorMessage = "入库结果（0未入库，99入库完成）不能为空")]
        public int Result { get; set; }

        public string CreateBy { get; set; }

        public DateTime? CreateTime { get; set; }

        public string UpdateBy { get; set; }

        public DateTime? UpdateTime { get; set; }

        public string Remark { get; set; }

        [Required(ErrorMessage = "BN/SN码不能为空")]
        public string BnSnCode { get; set; }

        [Required(ErrorMessage = "交验单行项目不能为空")]
        public int RowNo { get; set; }

        [Required(ErrorMessage = "交验单数量不能为空")]
        public int Qty { get; set; }

        [Required(ErrorMessage = "质检合格数量不能为空")]
        public int CheckQty { get; set; }



    }
}