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 InRetreatRecordQueryDto : PagerInfo
    {
        public string MaterialCode { get; set; }
        public string MaterialName { get; set; }
        public string MaterialSpec { get; set; }
        public string Category { get; set; }
        public string BnSnCode { get; set; }
        public bool? KeyFlag { get; set; }
        public DateTime? BeginTime { get; set; }
        public DateTime? EndTime { get; set; }


    }

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

        [Required(ErrorMessage = "退料记录单号（流水号，用于记录每一次的退料操作）不能为空")]
        public string RetreatNo { 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 Category { get; set; }

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

        public int? RetreatQty { 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 = "SAP退料单明细ID不能为空")]
        public string BomDtlId { get; set; }

        [Required(ErrorMessage = "规格型号/图号不能为空")]
        public string MaterialSpec { get; set; }

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

        public int? ReceiveQty { get; set; }

        public string ReasonType { get; set; }

        public string ReasonDesc { get; set; }



    }
}