62 lines
3.6 KiB
C#
62 lines
3.6 KiB
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace WorkerService1.Dto;
|
|
|
|
// {"code":0,"msg":"成功","data":{"token":"sXMHBPcPEBqrHCBfAREgMoffLbGutKszqfclcYJoXRvonLHsZiVZXcNgjwiD","expireTime":86400000,"user":{"organization":{"users":[],"orgName":"甘泉街道","subOrgs":[],"userCount":0,"orderCode":0,"orgLevel":1,"userTotalCount":0,"permit":true,"id":"6e9232ef-7b84-11e8-86b1-6c92bf4e6960"},"online":false,"passWDInit":false,"ip":"","sso":false,"userName":"ganquanjiedao","roles":[{"users":[],"remark":"","roleName":"高级管理员","permissions":[],"id":"0c772d50-a4af-439f-a18a-8fd332343d5e"}],"pkiId":"","creator":"73d82f01-dc1e-4666-bc79-3e59fc574cee","isApp":false,"thumb":"","phoneNo":"","employeeId":"","enabled":true,"userRealName":"ganquan","clientAppId":"megcity-web","datas":{},"id":"27465e20-6942-4569-8141-2ff5c264111e"}}}
|
|
public class LoginResponse
|
|
{
|
|
[JsonPropertyName("code")] public int Code { get; set; }
|
|
[JsonPropertyName("msg")] public string? Msg { get; set; }
|
|
[JsonPropertyName("data")] public LoginResultData? Data { get; set; }
|
|
}
|
|
|
|
public class LoginResultData
|
|
{
|
|
[JsonPropertyName("token")] public string? Token { get; set; }
|
|
[JsonPropertyName("expireTime")] public int ExpireTime { get; set; }
|
|
[JsonPropertyName("user")] public LoginResultDataUser? User { get; set; }
|
|
}
|
|
|
|
public class LoginResultDataUser
|
|
{
|
|
[JsonPropertyName("organization")] public LoginResultDataUserOrganization? Organization { get; set; }
|
|
[JsonPropertyName("online")] public bool Online { get; set; }
|
|
[JsonPropertyName("passWDInit")] public bool PassWDInit { get; set; }
|
|
[JsonPropertyName("ip")] public string? Ip { get; set; }
|
|
[JsonPropertyName("sso")] public bool Sso { get; set; }
|
|
[JsonPropertyName("userName")] public string? UserName { get; set; }
|
|
[JsonPropertyName("roles")] public LoginResultDataUserRole[]? Roles { get; set; }
|
|
[JsonPropertyName("pkiId")] public string? PkiId { get; set; }
|
|
[JsonPropertyName("creator")] public string? Creator { get; set; }
|
|
[JsonPropertyName("isApp")] public bool IsApp { get; set; }
|
|
[JsonPropertyName("thumb")] public string? Thumb { get; set; }
|
|
[JsonPropertyName("phoneNo")] public string? PhoneNo { get; set; }
|
|
[JsonPropertyName("employeeId")] public string? EmployeeId { get; set; }
|
|
[JsonPropertyName("enabled")] public bool Enabled { get; set; }
|
|
[JsonPropertyName("userRealName")] public string? UserRealName { get; set; }
|
|
[JsonPropertyName("clientAppId")] public string? ClientAppId { get; set; }
|
|
[JsonPropertyName("datas")] public object? Datas { get; set; }
|
|
[JsonPropertyName("id")] public string? Id { get; set; }
|
|
}
|
|
|
|
public class LoginResultDataUserOrganization
|
|
{
|
|
[JsonPropertyName("users")] public object[]? Users { get; set; }
|
|
[JsonPropertyName("orgName")] public string? OrgName { get; set; }
|
|
[JsonPropertyName("subOrgs")] public object[]? SubOrgs { get; set; }
|
|
[JsonPropertyName("userCount")] public int UserCount { get; set; }
|
|
[JsonPropertyName("orderCode")] public int OrderCode { get; set; }
|
|
[JsonPropertyName("orgLevel")] public int OrgLevel { get; set; }
|
|
[JsonPropertyName("userTotalCount")] public int UserTotalCount { get; set; }
|
|
[JsonPropertyName("permit")] public bool Permit { get; set; }
|
|
[JsonPropertyName("id")] public string? Id { get; set; }
|
|
}
|
|
|
|
public class LoginResultDataUserRole
|
|
{
|
|
[JsonPropertyName("users")] public object[]? Users { get; set; }
|
|
[JsonPropertyName("remark")] public string? Remark { get; set; }
|
|
[JsonPropertyName("roleName")] public string? RoleName { get; set; }
|
|
[JsonPropertyName("permissions")] public object[]? Permissions { get; set; }
|
|
[JsonPropertyName("id")] public string? Id { get; set; }
|
|
} |