33 lines
546 B
C#
33 lines
546 B
C#
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace IRaCIS.Core.Domain.Models
|
|
{
|
|
public abstract class Entity: Entity<Guid>
|
|
{
|
|
|
|
//public virtual Guid Id { get; set; }
|
|
|
|
//protected Entity()
|
|
//{
|
|
// Id = Guid.NewGuid();
|
|
//}
|
|
}
|
|
|
|
public interface IEntity
|
|
{
|
|
|
|
}
|
|
|
|
|
|
public class Entity<TKey> : IEntity
|
|
{
|
|
/// <summary>
|
|
/// 编号
|
|
/// </summary>
|
|
[Key]
|
|
[Required]
|
|
public virtual TKey Id { get; set; }
|
|
}
|
|
}
|