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

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
}
}