Taylohtio/PelsuIntegration/PelsuIntegration/Role.cs

60 lines
1.4 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Taloyhtio.PelsuIntegration
{
// public enum RoleType
// {
// Tenant = 0,
// Landlord = 1,
// BoardMember = 2,
// RegisteredTenant = 3,
// RegisteredLandlord = 4,
// PropertyManager = 5
// }
public struct Role
{
public Guid WebId;
public string WebUrl;
public string Name;
public bool IsCondo;
public string CondoShortName;
public Role(Guid webId, string webUrl, string name, bool isCondo, string condoShortName)
{
this.WebId = webId;
this.WebUrl = webUrl;
this.Name = name;
this.IsCondo = isCondo;
this.CondoShortName = condoShortName;
}
public override string ToString()
{
return string.Format("Name = {0}, IsCondo = {1}, CondoShortName = {2}, WebUrl = {3}, WebId = {4}",
this.Name, this.IsCondo, this.CondoShortName, this.WebUrl, this.WebId);
}
}
public struct JsonUsername
{
public string first;
public string last;
}
public struct JsonRole
{
public Guid id;
public string role;
}
public struct JsonUserRole
{
public string email;
public JsonUsername name;
public JsonRole[] roles;
}
}