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

namespace ZR.Model.Dto.OutStore
{
    /// <summary>
    /// 出库管理/出库记录表查询对象
    /// </summary>
    public class OutOutstoreRecordQueryDto : PagerInfo
    {
        //出库记录单号
        public string OutSotreNo { 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 bool? KeyFlag { get; set; }
        //BN/SN码
        public string BnSnCode { get; set; }
        //创建人
        public string CreateBy { get; set; }
        //创建时间
        public DateTime? BeginTime { get; set; }
        public DateTime? EndTime { get; set; }
    }

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

        [Required(ErrorMessage = "出库记录单号（流水号，用于记录每一次的出库操作）不能为空")]
        public string OutSotreNo { 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? OutStoreQty { 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; }



    }
}