using Microsoft.EntityFrameworkCore; using System; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using Volo.Abp; using Volo.Abp.Domain.Entities; namespace Business.Domain { public abstract class BaseEntity : Entity, ISoftDelete { public BaseEntity() { } public BaseEntity(long Id) : base(Id) { } /// /// 生成新的Id /// public void GenerateNewId(long id) { Id = id; } /// /// 创建人 /// [Comment("创建人id")] public virtual long? create_by { get; set; } /// /// 创建人名称 /// [StringLength(50)] [Comment("创建人名称")] public virtual string create_by_name { get; set; } /// /// 创建时间 /// [Comment("创建时间")] public virtual DateTime? create_time { get; set; } /// /// 修改人 /// [Comment("修改人")] public virtual long? update_by { get; set; } /// /// 修改人名称 /// [StringLength(50)] [Comment("修改人名称")] public virtual string? update_by_name { get; set; } /// /// 修改时间 /// [Comment("修改时间")] public virtual DateTime? update_time { get; set; } /// /// 租户ID /// [Comment("租户ID")] [DefaultValue(1000)] public virtual long? tenant_id { get; set; } /// /// 公司ID /// [Comment("公司ID")] public virtual long? company_id { get; set; } /// /// 工厂ID /// [Comment("工厂ID")] public virtual long? factory_id { get; set; } /// /// 组织ID /// [Comment("组织ID")] public virtual long? org_id { get; set; } /// /// 删除标识 /// [Required] [DefaultValue(false)] [Comment("删除标识")] public bool IsDeleted { get; set; } } }