
//-----------------------------------------------------------------------
//<copyright>
// * Copyright (C) 2021 KEHAIDASOFT All Rights Reserved
// * version : 4.0.30319.42000
// * author  : khd by t4-2
// </copyright>
//-----------------------------------------------------------------------

using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Khd.Core.Domain.Models
{

    [Table("wms_move")]
    public class WmsMove
    {
        [Key]
        [Column("move_id")]
        public long MoveId { get; set; }

        [Required]
        [Column("task_code")]
        [MaxLength(128)]
        public string TaskCode { get; set; }

        [Required]
        [Column("warehouse_id")]
        public long WarehouseId { get; set; }

        [Required]
        [Column("ori_location_code")]
        [MaxLength(64)]
        public string OriLocationCode { get; set; }

        [Required]
        [Column("target_location_code")]
        [MaxLength(64)]
        public string TargetLocationCode { get; set; }

        [Column("instock_batch")]
        [MaxLength(64)]
        public string InstockBatch { get; set; }

        [Column("material_id")]
        public long? MaterialId { get; set; }

        [Column("plan_amount")]
        public decimal? PlanAmount { get; set; }

        [Column("real_outstock_amount")]
        public decimal RealOutstockAmount { get; set; } = 0.000000m;

        [Column("real_instock_amount")]
        public decimal RealInstockAmount { get; set; } = 0.000000m;

        [Required]
        [Column("operation_type")]
        [MaxLength(1)]
        public string OperationType { get; set; }

        [Required]
        [Column("move_way")]
        [MaxLength(1)]
        public string MoveWay { get; set; }

        [Required]
        [Column("move_type")]
        [MaxLength(1)]
        public string MoveType { get; set; }

        [Column("apply_reason")]
        [MaxLength(500)]
        public string ApplyReason { get; set; }

        [Column("audit_reason")]
        [MaxLength(500)]
        public string AuditReason { get; set; }

        [Required]
        [Column("audit_status")]
        [MaxLength(1)]
        public string AuditStatus { get; set; }

        [Required]
        [Column("execute_status")]
        [MaxLength(1)]
        public string ExecuteStatus { get; set; }

        [Column("apply_by")]
        [MaxLength(64)]
        public string ApplyBy { get; set; }

        [Column("apply_date")]
        public DateTime? ApplyDate { get; set; }

        [Column("audit_by")]
        [MaxLength(64)]
        public string AuditBy { get; set; }

        [Column("audit_date")]
        public DateTime? AuditDate { get; set; }

        [Column("update_by")]
        [MaxLength(64)]
        public string UpdateBy { get; set; }

        [Column("update_date")]
        public DateTime? UpdateDate { get; set; }

        [Column("begin_time")]
        public DateTime? BeginTime { get; set; }

        [Column("end_time")]
        public DateTime? EndTime { get; set; }
    }
}

