UnitModel.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. using GreenTree.Strohrmann.ERP.Core.Domain.Business;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Threading.Tasks;
  6. namespace GreenTree.Strohrmann.ERP.Web.Models.Business
  7. {
  8. public class UnitModel
  9. {
  10. #region Properties
  11. /// <summary>
  12. /// Unit id
  13. /// </summary>
  14. public int Id { get; set; }
  15. /// <summary>
  16. /// Unit name
  17. /// </summary>
  18. public string Name { get; set; }
  19. /// <summary>
  20. /// Unit short name
  21. /// </summary>
  22. public string ShortName { get; set; }
  23. /// <summary>
  24. /// Unit description
  25. /// </summary>
  26. public string Description { get; set; }
  27. #endregion
  28. #region Ctor
  29. /// <summary>
  30. /// Initializes a new instance of the UnitModel class
  31. /// </summary>
  32. public UnitModel() { }
  33. /// <summary>
  34. /// Initializes a new instance of the UnitModel class
  35. /// </summary>
  36. /// <param name="unit">The base unit.</param>
  37. public UnitModel(Unit unit)
  38. {
  39. if (unit == null) return;
  40. Id = unit.Id;
  41. Name = unit.Name;
  42. ShortName = unit.ShortName;
  43. Description = unit.Description;
  44. }
  45. #endregion
  46. }
  47. }