Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Dev rebase #57

Merged
merged 3 commits into from
Oct 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified Script.sql
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ public class ApplicationUser : IdentityUser

public string? ImageUrl { get; set; }

public bool IsDelete { get; set; } = false;
public string? CreatedBy { get; set; }
public string? LastUpdatedBy { get; set; }

#region Relationship

[ForeignKey("Wallet")]
Expand All @@ -19,5 +23,12 @@ public class ApplicationUser : IdentityUser

public Wallet? Wallet { get; set; }


//public string? DeletedBy { get; set; }

public DateTimeOffset? CreatedTime { get; set; }

public DateTimeOffset? LastUpdatedTime { get; set; }

#endregion Relationship
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
using System.Security.Claims;
using SWD_Laundry_Backend.Contract.Repository.Entity.IdentityModels;
using SWD_Laundry_Backend.Contract.Service.Base_Service_Interface;
using SWD_Laundry_Backend.Core.Models.Common;
using SWD_Laundry_Backend.Core.QueryObject;

namespace SWD_Laundry_Backend.Contract.Service.Interface;
public interface IIdentityService : IBaseIdentityService
{

public Task SetVerifiedPhoneNumberAsync(ApplicationUser user, string phoneNumber);
public Task<IList<string>?> GetRolesAsync(ApplicationUser user);
public ApplicationUser GetUserByIdAsync(string userId);
public Task<ApplicationUser> GetUserByIdAsync(string userId);

public Task AddToRoleAsync(ApplicationUser user, string role);

Expand All @@ -17,4 +20,6 @@ public interface IIdentityService : IBaseIdentityService
public Task SetVerfiedEmailAsync(ApplicationUser user, string email);
public Task<int> SetWalletAsync(ApplicationUser user, string walletId);
public Task SetUserAvatarUrlAsync(ApplicationUser identity, string photoUrl);

public Task<PaginatedList<ApplicationUser>> GetPaginatedAsync(ApplicationUserQuery query, CancellationToken cancellationToken = default);
}
13 changes: 13 additions & 0 deletions src/SWD-Laundry-Backend.Core/QueryObject/ApplicationUserQuery.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;

namespace SWD_Laundry_Backend.Core.QueryObject;
public record ApplicationUserQuery : BaseQuery
{
[BindProperty(Name = "email", SupportsGet = true)]
public string? Email { get; init; }
}
Loading