| | |
| | | using Furion.DatabaseAccessor; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using Microsoft.EntityFrameworkCore.Metadata.Builders; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using System.ComponentModel.DataAnnotations; |
| | | using System.ComponentModel.DataAnnotations.Schema; |
| | | |
| | | /* |
| | | * @author : 刘文奇 |
| | | * @date : 2024/4/23下午6:31:24 |
| | | * @desc : 库区表 |
| | | */ |
| | | namespace Admin.NET.Core |
| | | { |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | [Table("wms_area")] |
| | | [Comment("库区表")] |
| | | public class WmsArea : DEntityBase, IEntityTypeBuilder<WmsArea> |
| | | public class WmsArea : DEntityBase |
| | | { |
| | | |
| | | |
| | | /// <summary> |
| | | /// 名称 |
| | | /// 库区编码 |
| | | /// </summary> |
| | | [Comment("名称")] |
| | | [Comment("库区编码")] |
| | | [Required] |
| | | [MaxLength(50)] |
| | | public string AreaCode { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 仓库编号 |
| | | /// </summary> |
| | | [Comment("仓库编号")] |
| | | [Required] |
| | | [MaxLength(50)] |
| | | public string WarehouseCode { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 仓库名称 |
| | | /// </summary> |
| | | [Comment("仓库名称")] |
| | | [Required] |
| | | [MaxLength(255)] |
| | | public string WarehouseName { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 库区名称 |
| | | /// </summary> |
| | | [Comment("库区名称")] |
| | | [Required] |
| | | [MaxLength(50)] |
| | | public string AreaName { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 描述 |
| | | /// 库区描述 |
| | | /// </summary> |
| | | [Comment("描述")] |
| | | [MaxLength(250)] |
| | | [Comment("库区描述")] |
| | | [MaxLength(50)] |
| | | public string AreaDesc { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 状态;数据字典 |
| | | /// 库区状态 |
| | | /// </summary> |
| | | [Comment("状态")] |
| | | [Comment("库区状态")] |
| | | [Required] |
| | | public CommonStatus AreaStatus { get; set; } |
| | | |
| | | public int AreaStatus { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 分类;数据字典 |
| | | /// ERP库存地 |
| | | /// </summary> |
| | | [Comment("分类")] |
| | | [Comment("ERP库存地")] |
| | | [Required] |
| | | public AreaType AreaType { get; set; } |
| | | [MaxLength(50)] |
| | | public string ErpCode { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 是否为钢平台 |
| | | /// 所属仓库 |
| | | /// </summary> |
| | | [Comment("是否为钢平台")] |
| | | public bool IsSteel { get; set; } |
| | | [Comment("所属仓库")] |
| | | [Required] |
| | | |
| | | public long WarehouseId { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 所属车间 |
| | | /// 零件级管控 |
| | | /// </summary> |
| | | [Comment("所属车间")] |
| | | public LesWorkShopType WorkShopType { get; set; } |
| | | [Comment("零件级管控")] |
| | | [Required] |
| | | |
| | | public bool IsBarcodeLevelControl { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 库位表 |
| | | /// 检验先进先出 |
| | | /// </summary> |
| | | public ICollection<WmsPlace> WmsPlaces { get; set; } |
| | | [Comment("检验先进先出")] |
| | | [Required] |
| | | |
| | | public bool IsFIFO { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 库口表 |
| | | /// 零件级管控 |
| | | /// </summary> |
| | | public ICollection<LesEntrance> LesEntrance { get; set; } |
| | | [Comment("零件级管控")] |
| | | [Required] |
| | | |
| | | public bool IsPartLevelControl { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 构建一对多的关系 |
| | | /// 允许混淆 |
| | | /// </summary> |
| | | /// <param name="entityBuilder"></param> |
| | | /// <param name="dbContext"></param> |
| | | /// <param name="dbContextLocator"></param> |
| | | public void Configure(EntityTypeBuilder<WmsArea> entityBuilder, DbContext dbContext, Type dbContextLocator) |
| | | { |
| | | entityBuilder.HasMany(x => x.WmsPlaces) |
| | | .WithOne(x => x.WmsArea) |
| | | .HasForeignKey(x => x.AreaId).IsRequired(true); |
| | | entityBuilder.HasMany(x => x.LesEntrance) |
| | | .WithOne(x => x.WmsArea) |
| | | .HasForeignKey(x => x.AreaId).IsRequired(true); |
| | | } |
| | | [Comment("允许混淆")] |
| | | [Required] |
| | | |
| | | public bool IsAllowConfusion { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 允许负库存 |
| | | /// </summary> |
| | | [Comment("允许负库存")] |
| | | [Required] |
| | | |
| | | public bool IsAllowNegativeInventory { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 是否虚拟 |
| | | /// </summary> |
| | | [Comment("是否虚拟")] |
| | | [Required] |
| | | |
| | | public bool IsVirtually { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 是否禁用 |
| | | /// </summary> |
| | | [Comment("是否禁用")] |
| | | [Required] |
| | | |
| | | public bool IsDisabled { get; set; } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | | } |