| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel.DataAnnotations; |
| | | using System.ComponentModel.DataAnnotations.Schema; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace FlexJobApi.Core |
| | | { |
| | | public abstract class CommonEntity<TDbContextLocator1> : Entity<Guid, TDbContextLocator1>, IPrivateEntity |
| | | public abstract class CommonEntity<TDbContextLocator1, TDbContextLocator2> : CommonEntity, IPrivateEntity |
| | | where TDbContextLocator1 : class, IDbContextLocator |
| | | where TDbContextLocator2 : class, IDbContextLocator |
| | | { |
| | | /// <summary> |
| | | /// 排序 |
| | | /// </summary> |
| | | public virtual int Sort { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 跟踪Id |
| | | /// </summary> |
| | | public virtual string TraceId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建操作人 |
| | | /// </summary> |
| | | public virtual Guid? CreatedUserInfoId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 最后更新操作人 |
| | | /// </summary> |
| | | public virtual Guid? UpdatedUserInfoId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 是否删除 |
| | | /// </summary> |
| | | public virtual bool IsDeleted { get; set; } |
| | | } |
| | | |
| | | public abstract class CommonEntity : Entity<Guid>, IPrivateEntity |
| | | public abstract class CommonEntity<TDbContextLocator1> : CommonEntity, IPrivateEntity |
| | | where TDbContextLocator1 : class, IDbContextLocator |
| | | { |
| | | } |
| | | |
| | | public abstract class CommonEntity : PrivateEntity<Guid>, IPrivateEntity |
| | | { |
| | | /// <summary> |
| | | /// 主键Id |
| | | /// </summary> |
| | | [Key] |
| | | [DatabaseGenerated(DatabaseGeneratedOption.Identity)] |
| | | public override Guid Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 排序 |
| | | /// </summary> |
| | |
| | | public virtual string TraceId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建时间 |
| | | /// </summary> |
| | | public override DateTimeOffset CreatedTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建操作人 |
| | | /// </summary> |
| | | public virtual Guid? CreatedUserInfoId { get; set; } |
| | | public virtual Guid? CreatedUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建企业Id |
| | | /// </summary> |
| | | public virtual Guid? CreatedEnterpriseId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 最后更新时间 |
| | | /// </summary> |
| | | public override DateTimeOffset? UpdatedTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 最后更新操作人 |
| | | /// </summary> |
| | | public virtual Guid? UpdatedUserInfoId { get; set; } |
| | | public virtual Guid? UpdatedUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 是否删除 |