33 lines
		
	
	
		
			608 B
		
	
	
	
		
			C#
		
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			608 B
		
	
	
	
		
			C#
		
	
	
| using System;
 | |
| using System.ComponentModel.DataAnnotations;
 | |
| using System.ComponentModel.DataAnnotations.Schema;
 | |
| using MassTransit;
 | |
| 
 | |
| namespace IRaCIS.Core.Domain.Models
 | |
| {
 | |
|     public abstract class Entity : IEntity<Guid> 
 | |
|     {
 | |
|         [Key]
 | |
|         [Required]
 | |
|         [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
 | |
|         public Guid Id { get ; set ; }
 | |
|     }
 | |
| 
 | |
|     public interface IEntity<TKey>
 | |
|     {
 | |
|         /// <summary>
 | |
|         /// 编号
 | |
|         /// </summary>
 | |
|        
 | |
|   
 | |
|        
 | |
|         abstract TKey Id { get; set; }
 | |
|     }
 | |
| 
 | |
| 
 | |
|     //public class Entity<TKey> : IEntity
 | |
|     //{
 | |
|        
 | |
|     //}
 | |
| }
 |