27 lines
691 B
C#
27 lines
691 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace Project.Domain.Entities
|
|
{
|
|
[Table("CATEGORY_ROLE", Schema = "dbo")]
|
|
public class CategoryRole
|
|
{
|
|
[Key]
|
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
[Column("ID")]
|
|
public int Id { get; set; }
|
|
|
|
public int CategoryId { get; set; }
|
|
|
|
public int RoleId { get; set; }
|
|
|
|
[ForeignKey("CategoryId")]
|
|
[Required]
|
|
[Column("PRODUCT_CATEGORY")]
|
|
public Category? Category { get; set; }
|
|
|
|
[ForeignKey("RoleId")]
|
|
public Role? Role { get; set; }
|
|
}
|
|
}
|