using System;
using AutoMapper;
using BO.BO;
using Forks.EnterpriseServices.DomainObjects2;
using Newtonsoft.Json;
using TrunksIousOutInStore.Rpc;

namespace TrunksIousOutInStore.LocalSyncBO
{

  [Serializable]
  [MapToTable("TrunksIousOutInStoreRecord")]
  public class TrunksIousOutInStoreRecord: LocalSyncBase
  {
    public string BarCode { get; set; }
    public long? Goods_ID { get; set; }
    public string Goods_Name { get; set; }

    private int mNumber = 1;
    public int Number
    {
      get { return mNumber; }
      set { mNumber = value; }
    }

    public decimal? Weight { get; set; }

    public string CarcassStatus{ get; set; }// 胴体状态
    public override string GetDtoJson()
    {
      var config = new MapperConfiguration(cfg => {
        cfg.CreateMap<TrunksIousOutInStoreRecord, TrunksIousOutInStoreRecordDto>();
      });
      var mapper = config.CreateMapper();
      var dto = mapper.Map<TrunksIousOutInStoreRecordDto>(this);
      dto.Client_ID = this.ID;
      return JsonConvert.SerializeObject(dto);
    }
  }

  public class CarcassStatus
  {
    public static readonly string 胴体称重 = "胴体称重";
    public static readonly string 入预冷库 = "入预冷库";
    public static readonly string 分割领用 = "分割领用";
    public static readonly string 入销售库 = "入销售库";
    public static readonly string 销售出库 = "销售出库";
    
  }
}
