You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
953 B
45 lines
953 B
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace CockRoachDBEFCoreTest
|
|
{
|
|
public class User
|
|
{
|
|
public User()
|
|
{
|
|
this.Id = Guid.NewGuid();
|
|
}
|
|
|
|
public Guid Id { get; set; }
|
|
public string Name { get; set; }
|
|
public List<UserRole> UserRoles { get; set; } = new List<UserRole>();
|
|
}
|
|
|
|
public class Role
|
|
{
|
|
public Role()
|
|
{
|
|
this.Id = Guid.NewGuid();
|
|
}
|
|
|
|
public Guid Id { get; set; }
|
|
public string Name { get; set; }
|
|
public List<UserRole> UserRoles { get; set; } = new List<UserRole>();
|
|
}
|
|
|
|
public class UserRole
|
|
{
|
|
public UserRole()
|
|
{
|
|
this.Id = Guid.NewGuid();
|
|
}
|
|
|
|
public Guid Id { get; set; }
|
|
public Guid UserId { get; set; }
|
|
public Guid RoleId { get; set; }
|
|
|
|
public User User { get; set; }
|
|
|
|
public Role Role { get; set; }
|
|
}
|
|
} |