Skip to content

Commit 613ab6b

Browse files
authored
Merge pull request #24 from KYJKY/master
개별 Profile 가져오는 API 추가
2 parents 8869cce + 2ba53c8 commit 613ab6b

File tree

95 files changed

+3163
-2413
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+3163
-2413
lines changed

Contracts/Repository/IRepositoryBase.cs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@
55
using System.Text;
66
using System.Threading.Tasks;
77

8-
namespace Contracts.Repository
8+
namespace Contracts.Repository;
9+
10+
public interface IRepositoryBase<T>
911
{
10-
public interface IRepositoryBase<T>
11-
{
12-
IQueryable<T> FindAll(bool trackChanges);
13-
IQueryable<T> FindByCondition(Expression<Func<T, bool>> expression, bool trackChanges);
14-
void Create(T entity);
15-
void Update(T entity);
16-
void Delete(T entity);
17-
}
12+
IQueryable<T> FindAll(bool trackChanges);
13+
IQueryable<T> FindByCondition(Expression<Func<T, bool>> expression, bool trackChanges);
14+
void Create(T entity);
15+
void Update(T entity);
16+
void Delete(T entity);
1817
}

Contracts/Repository/IRepositoryManager.cs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,15 @@
55
using System.Text;
66
using System.Threading.Tasks;
77

8-
namespace Contracts.Repository
8+
namespace Contracts.Repository;
9+
10+
public interface IRepositoryManager
911
{
10-
public interface IRepositoryManager
11-
{
12-
ICommentRepository Comment { get; }
13-
ILikeRepository Like { get; }
14-
IPostPhotoRepository PostPhoto { get; }
15-
IPostRepository Post { get; }
16-
IProfileRepository Profile { get; }
17-
IUserRepository User { get; }
18-
Task SaveAsync();
19-
}
12+
ICommentRepository Comment { get; }
13+
ILikeRepository Like { get; }
14+
IPostPhotoRepository PostPhoto { get; }
15+
IPostRepository Post { get; }
16+
IProfileRepository Profile { get; }
17+
IUserRepository User { get; }
18+
Task SaveAsync();
2019
}

Contracts/Repository/Models/ICommentRepository.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55
using System.Text;
66
using System.Threading.Tasks;
77

8-
namespace Contracts.Repository.Models
8+
namespace Contracts.Repository.Models;
9+
10+
public interface ICommentRepository
911
{
10-
public interface ICommentRepository
11-
{
12-
Task<IEnumerable<Comment>> GetAllComment(bool trackChanges);
13-
Task<IEnumerable<Comment>> GetCommentByPostId(int postId, bool trackChange);
14-
void CreateComment(Comment comment);
15-
}
12+
Task<IEnumerable<Comment>> GetAllComment(bool trackChanges);
13+
Task<IEnumerable<Comment>> GetCommentByPostId(int postId, bool trackChange);
14+
void CreateComment(Comment comment);
1615
}

Contracts/Repository/Models/ILikeRepository.cs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@
55
using System.Text;
66
using System.Threading.Tasks;
77

8-
namespace Contracts.Repository.Models
8+
namespace Contracts.Repository.Models;
9+
10+
public interface ILikeRepository
911
{
10-
public interface ILikeRepository
11-
{
12-
Task<IEnumerable<Like>> GetAllLike(bool trackChanges);
13-
Task<IEnumerable<Like>> GetLikeByPostId(int postId, bool trackChange);
14-
Task<int> GetLikeCountByPostId(int postId, bool trackChange);
15-
void CreateLike(Like like);
16-
}
12+
Task<IEnumerable<Like>> GetAllLike(bool trackChanges);
13+
Task<IEnumerable<Like>> GetLikeByPostId(int postId, bool trackChange);
14+
Task<int> GetLikeCountByPostId(int postId, bool trackChange);
15+
void CreateLike(Like like);
1716
}

Contracts/Repository/Models/IPostPhotoRepository.cs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@
55
using System.Text;
66
using System.Threading.Tasks;
77

8-
namespace Contracts.Repository.Models
8+
namespace Contracts.Repository.Models;
9+
10+
public interface IPostPhotoRepository
911
{
10-
public interface IPostPhotoRepository
11-
{
12-
Task<IEnumerable<PostPhoto>> GetAllPostPhoto(bool trackChanges);
13-
Task<IEnumerable<PostPhoto>> GetPostPhotoByPostId(int postId, bool trackChange);
14-
void CreatePostPhoto(PostPhoto postphoto);
15-
Task<int> GetLatestPostPhotoId();
16-
}
12+
Task<IEnumerable<PostPhoto>> GetAllPostPhoto(bool trackChanges);
13+
Task<IEnumerable<PostPhoto>> GetPostPhotoByPostId(int postId, bool trackChange);
14+
void CreatePostPhoto(PostPhoto postphoto);
15+
Task<int> GetLatestPostPhotoId();
1716
}

Contracts/Repository/Models/IPostRepository.cs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@
66
using System.Text;
77
using System.Threading.Tasks;
88

9-
namespace Contracts.Repository.Models
9+
namespace Contracts.Repository.Models;
10+
11+
public interface IPostRepository
1012
{
11-
public interface IPostRepository
12-
{
13-
Task<IEnumerable<Post>> GetAllPost(bool trackChanges);
14-
Task<Post> GetPostById(int postId, bool trackChanges);
15-
Task<IEnumerable<Post>> GetSearchPost(double x, double y, double range, bool trackChanges);
16-
void CreatePost(Post post);
17-
}
13+
Task<IEnumerable<Post>> GetAllPost(bool trackChanges);
14+
Task<Post> GetPostById(int postId, bool trackChanges);
15+
Task<IEnumerable<Post>> GetSearchPost(double x, double y, double range, bool trackChanges);
16+
void CreatePost(Post post);
1817
}

Contracts/Repository/Models/IProfileRepository.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
using System.Text;
66
using System.Threading.Tasks;
77

8-
namespace Contracts.Repository.Models
8+
namespace Contracts.Repository.Models;
9+
10+
public interface IProfileRepository
911
{
10-
public interface IProfileRepository
11-
{
12-
Task<IEnumerable<Profile>> GetAllProfile(bool trackChanges);
13-
}
12+
Task<IEnumerable<Profile>> GetAllProfile(bool trackChanges);
13+
void CreateProfile(Profile profile);
14+
Task<Profile> GetProfileByUserId(string userId, bool trackChanges);
1415
}

Contracts/Repository/Models/IUserRepository.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55
using System.Text;
66
using System.Threading.Tasks;
77

8-
namespace Contracts.Repository.Models
8+
namespace Contracts.Repository.Models;
9+
10+
public interface IUserRepository
911
{
10-
public interface IUserRepository
11-
{
12-
Task<IEnumerable<User>> GetAllUser(bool trackChanges);
13-
Task<User> GetUserByEmail(string email, bool tackChanges);
14-
}
12+
Task<IEnumerable<User>> GetAllUser(bool trackChanges);
13+
Task<User> GetUserByEmail(string email, bool tackChanges);
1514
}

EveryPinApi.Entites/Code/CodePlatform.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44
using System.Text;
55
using System.Threading.Tasks;
66

7-
namespace Entites.Code
7+
namespace Entites.Code;
8+
9+
public enum CodePlatform
810
{
9-
public enum CodePlatform
10-
{
11-
NONE = -1,
12-
KAKAO = 1,
13-
GOOGLE = 2
14-
}
11+
NONE = -1,
12+
KAKAO = 1,
13+
GOOGLE = 2
1514
}

EveryPinApi.Entites/ErrorModel/ErrorDetails.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55
using System.Text.Json;
66
using System.Threading.Tasks;
77

8-
namespace Entites.ErrorModel
8+
namespace Entites.ErrorModel;
9+
10+
public class ErrorDetails
911
{
10-
public class ErrorDetails
11-
{
12-
public int StatusCode { get; set; }
13-
public string? Message { get; set; }
14-
public override string ToString() => JsonSerializer.Serialize(this);
15-
}
12+
public int StatusCode { get; set; }
13+
public string? Message { get; set; }
14+
public override string ToString() => JsonSerializer.Serialize(this);
1615
}

0 commit comments

Comments
 (0)