You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

207 lines
6.8 KiB

1 year ago
using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using ChangkeTec.SDMS.Model.Attributes;
using ChangkeTec.SDMS.Model.Base;
using ChangkeTec.SDMS.Model.Enums;
namespace ChangkeTec.SDMS.Model.DataCenterTables
{
[Description("��������")]
public class TS_PART_MSTR : IUpdatableTable, ISoftDelete, IDomain,INotifyPropertyChanged
{
[Required(ErrorMessage = "���벻��Ϊ��")]
[Index("IndexPartMstr", Order = 0, IsUnique = true, IsClustered = false)]
[IsDataGridColum(true, 1)]
[Description("������*")]
[StringLength(50)]
public string PartCode { get; set; }
[ColumnSource(ColumnSourceType.TABLE, typeof(TS_DOMAIN), new[] { "Code", "Desc" })]
[Required(ErrorMessage = "��������")]
[Index("IndexPartMstr", Order = 1, IsUnique = true, IsClustered = false)]
[IsDataGridColum(true, 28)]
[Description("��*")]
[StringLength(50)]
public string Domain { get; set; }
[IsDataGridColum(true, 2)]
[Description("����1")]
[StringLength(24)]
public string Desc1 { get; set; }
[IsDataGridColum(true, 3)]
[Description("����2")]
[StringLength(24)]
public string Desc2 { get; set; }
[Required(ErrorMessage = "�������")]
[ColumnSource(ColumnSourceType.TABLE, typeof(TS_CODE), new[] { "Code", "Desc" })]
[IsDataGridColum(true, 4)]
[Description("��λ*")]
[StringLength(50)]
public string Um { get; set; }
[Required(ErrorMessage = "��Ʒ�಻��Ϊ��")]
[ColumnSource(ColumnSourceType.TABLE, typeof(TS_PRODUCT_LINE), new[] { "Code", "Desc" })]
[IsDataGridColum(true, 5)]
[Description("��Ʒ��*")]
[StringLength(50)]
public string ProdLine { get; set; }
[IsDataGridColum(true, 6)]
[Description("��������*")]
public DateTime? AddDate { get; set; }
//[Required(ErrorMessage = "�����鲻��Ϊ��")]
[ColumnSource(ColumnSourceType.TABLE, typeof(TS_CODE), new[] { "Code", "Desc" })]
[IsDataGridColum(true, 6)]
[Description("������*")]
[StringLength(50)]
public string DsgnGroup { get; set; }
//[Required(ErrorMessage = "�����鲻��Ϊ��")]
[ColumnSource(ColumnSourceType.TABLE, typeof(TS_CODE), new[] { "Code", "Desc" })]
[IsDataGridColum(true, 8)]
[Description("������*")]
[StringLength(50)]
public string PromotionGroup { get; set; }
[Required(ErrorMessage = "�������Ͳ���Ϊ��")]
[ColumnSource(ColumnSourceType.TABLE, typeof(TS_CODE), new[] { "Code", "Desc" })]
[IsDataGridColum(true, 9)]
[Description("��������*")]
[StringLength(50)]
public string PartType { get; set; }
[Required(ErrorMessage = "״̬����Ϊ��")]
[ColumnSource(ColumnSourceType.TABLE, typeof(TS_CODE), new[] { "Code", "Desc" })]
[IsDataGridColum(true, 10)]
[Description("״̬*")]
[StringLength(50)]
public string Status { get; set; }
[ColumnSource(ColumnSourceType.TABLE, typeof(TS_CODE), new[] { "Code", "Desc" })]
[IsDataGridColum(true, 11)]
[Description("��*")]
[StringLength(50)]
public string Group { get; set; }
[IsDataGridColum(true, 12)]
[Description("ͼֽ")]
[StringLength(50)]
public string Drawing { get; set; }
[IsDataGridColum(true, 13)]
[Description("��Ŀ�޸�")]
[StringLength(50)]
public string PartRevision { get; set; }
[IsDataGridColum(true, 14)]
[Description("ͼֽλ��")]
[StringLength(50)]
public string DrawingLocation { get; set; }
[IsDataGridColum(true, 15)]
[Description("��С")]
[StringLength(50)]
public string Size { get; set; }
[IsDataGridColum(true, 16)]
[Description("�۸��ۿ�����")]
[StringLength(50)]
public string PriceBreakCategory { get; set; }
[IsDataGridColum(true, 17)]
[Description("����")]
public bool AuxiliaryMaterial { get; set; }
[IsDataGridColum(true, 18)]
[Description("���߽���")]
public bool OfflineSettlement { get; set; } = false;
[IsDataGridColum(true, 19)]
[Description("Q�ȼ�")]
[StringLength(50)]
public string Qgrade { get; set; }
[Required(ErrorMessage = "�������಻��Ϊ��")]
[ColumnSource(ColumnSourceType.ENUM, typeof(EnumPartKind))]
[IsDataGridColum(true, 20)]
[Description("��������*")]
public EnumPartKind WmsPartType { get; set; } = EnumPartKind.RAW;
[IsDataGridColum(true, 21)]
[Description("������ʽ")]
[StringLength(50)]
public string ManageWay { get; set; }
[IsDataGridColum(true, 22)]
[Description("��������")]
[StringLength(50)]
public string InventoryCode { get; set; }
[IsDataGridColum(true, 23)]
[Description("�������ͣ�����/������")]
[StringLength(50)]
public string ManageType { get; set; } = "����";
[ColumnSource(ColumnSourceType.ENUM, typeof(EnumInspectType))]
[Required(ErrorMessage = "�Ƿ����鲻��Ϊ��")]
[IsDataGridColum(true, 24)]
[Description("�Ƿ�����*")]
public EnumInspectType InspectType { get; set; } = EnumInspectType.ȫ;
[Key]
public Guid GUID { get; set; } = Guid.NewGuid();
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int UID { get; set; }
[IsDataGridColum(true, 24)]
[Description("������")]
[StringLength(50)]
public string CreateUser { get; set; }
[IsDataGridColum(true, 25)]
[Description("����ʱ��")]
public DateTime CreateTime { get; set; }
[IsDataGridColum(true, 27)]
[Description("��ע")]
public string Remark { get; set; }
[Description("�޸���")]
[StringLength(50)]
public string UpdateUser { get; set; }
[Description("�޸�ʱ��")]
public DateTime? UpdateTime { get; set; }
[Description("��ɾ��")]
public bool IsDeleted { get; set; }
#region IsChecked
private bool _isChecked = false;
[NotMapped]
public bool IsChecked
{
get => _isChecked;
set
{
_isChecked = value;
NotityPropertyChanged("IsChecked");
}
}
#endregion
#region INotifyPropertyChanged
public event PropertyChangedEventHandler PropertyChanged;
public void NotityPropertyChanged(string propertyName)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
#endregion
}
}