├── tests └── NArchBootcampProject.Application.Tests │ ├── Usings.cs │ ├── Startup.cs │ ├── Mocks │ ├── FakeDatas │ │ ├── RefreshTokenFakeData.cs │ │ └── OperationClaimFakeData.cs │ ├── Repositories │ │ ├── Auth │ │ │ ├── MockOtpAuthRepository.cs │ │ │ ├── MockEmailAuthenticatorRepository.cs │ │ │ ├── MockRefreshTokenRepository.cs │ │ │ └── MockUserOperationClaimRepository.cs │ │ └── UserMockRepository.cs │ └── Configurations │ │ └── MockConfiguration.cs │ └── DependencyResolvers │ ├── AuthServiceRegistrations.cs │ └── UsersTestServiceRegistration.cs ├── src └── nArchBootcampProject │ ├── WebAPI │ ├── GeneratedCertificates │ │ ├── 1752e100-97a3-44cd-86e6-bac7bd5e038c.pdf │ │ ├── 2a1c463b-4ba2-4cee-8108-24b5cf74f70c.pdf │ │ ├── 2e4bf1ae-8b47-4d2b-859d-f355d62e828a.pdf │ │ ├── 386a7c3e-fd78-43a1-846e-70acb7360403.pdf │ │ ├── f9547d2b-be2b-479d-8f51-0ae8e5e08bb9.pdf │ │ ├── 0e22646c-b48b-4c96-a86a-2080cb4f7e27.pdf │ │ ├── 1355855c-bb11-4a1c-8b5d-3096c775f937.pdf │ │ ├── 344bb3ba-1bf7-4f5e-a9b0-826d6a28dfbd.pdf │ │ ├── 39ee5408-010a-4c34-b405-431d2bbe2543.pdf │ │ ├── 497dff29-cdb4-44f0-accc-bafd57fc9255.pdf │ │ ├── 4a7e660f-a263-42cb-bc1a-09033de0f157.pdf │ │ ├── 4f7ae83b-595d-45b6-82ce-79e9586496cf.pdf │ │ ├── 588d6cde-c57f-4900-81ac-3ca33d8208bb.pdf │ │ ├── 7a28d793-5d47-4436-b99a-955c7b7721b6.pdf │ │ ├── 81387b1e-fba0-426e-9372-56c6d7b47ca2.pdf │ │ ├── 98396c11-497a-4929-b388-4f6b4e942c07.pdf │ │ ├── 99fc1f3e-01ba-424a-a2e0-4d64845a8495.pdf │ │ ├── a4fe9ddc-bcb8-4c80-8a9e-86a1c70612a1.pdf │ │ ├── b024fb66-60bf-4887-acc3-e4b447d131b8.pdf │ │ └── ddea959b-f851-4893-a815-5ff46b9a786d.pdf │ ├── wwwroot │ │ ├── image │ │ │ └── logo.png │ │ └── images │ │ │ └── logo.png │ ├── Controllers │ │ ├── Dtos │ │ │ └── UpdateByAuthFromServiceRequestDto.cs │ │ ├── ContactController.cs │ │ └── BaseController.cs │ └── WebAPIConfiguration.cs │ ├── Application │ ├── Features │ │ ├── Chapters │ │ │ ├── Resources │ │ │ │ └── Locales │ │ │ │ │ └── Chapters.en.yaml │ │ │ ├── Commands │ │ │ │ ├── Delete │ │ │ │ │ ├── DeletedChapterResponse.cs │ │ │ │ │ └── DeletedChapterCommandValidator.cs │ │ │ │ ├── Create │ │ │ │ │ ├── CreatedChapterResponse.cs │ │ │ │ │ └── CreateChapterCommandValidator.cs │ │ │ │ └── Update │ │ │ │ │ ├── UpdatedChapterResponse.cs │ │ │ │ │ └── UpdateChapterCommandValidator.cs │ │ │ ├── Constants │ │ │ │ ├── ChaptersBusinessMessages.cs │ │ │ │ └── ChaptersOperationClaims.cs │ │ │ └── Queries │ │ │ │ ├── GetList │ │ │ │ └── GetListChapterListItemDto.cs │ │ │ │ └── GetById │ │ │ │ └── GetByIdChapterResponse.cs │ │ ├── Comments │ │ │ ├── Resources │ │ │ │ └── Locales │ │ │ │ │ └── Comments.en.yaml │ │ │ ├── Commands │ │ │ │ ├── Delete │ │ │ │ │ ├── DeletedCommentResponse.cs │ │ │ │ │ └── DeletedCommentCommandValidator.cs │ │ │ │ ├── Create │ │ │ │ │ ├── CreatedCommentResponse.cs │ │ │ │ │ └── CreateCommentCommandValidator.cs │ │ │ │ └── Update │ │ │ │ │ ├── UpdatedCommentResponse.cs │ │ │ │ │ └── UpdateCommentCommandValidator.cs │ │ │ ├── Constants │ │ │ │ ├── CommentsBusinessMessages.cs │ │ │ │ └── CommentsOperationClaims.cs │ │ │ └── Queries │ │ │ │ ├── GetList │ │ │ │ └── GetListCommentListItemDto.cs │ │ │ │ ├── GetById │ │ │ │ └── GetByIdCommentResponse.cs │ │ │ │ └── GetListByBootcampId │ │ │ │ └── GetListCommentListByBootcampIdItemDto.cs │ │ ├── Applicants │ │ │ ├── Resources │ │ │ │ └── Locales │ │ │ │ │ └── Applicants.en.yaml │ │ │ ├── Constants │ │ │ │ ├── ApplicantsBusinessMessages.cs │ │ │ │ └── ApplicantsOperationClaims.cs │ │ │ ├── Commands │ │ │ │ ├── Delete │ │ │ │ │ ├── DeletedApplicantCommandValidator.cs │ │ │ │ │ └── DeletedApplicantResponse.cs │ │ │ │ ├── Create │ │ │ │ │ ├── CreateApplicantCommandValidator.cs │ │ │ │ │ └── CreatedApplicantResponse.cs │ │ │ │ └── Update │ │ │ │ │ ├── UpdateApplicantCommandValidator.cs │ │ │ │ │ └── UpdatedApplicantResponse.cs │ │ │ └── Queries │ │ │ │ ├── GetList │ │ │ │ └── GetListApplicantListItemDto.cs │ │ │ │ └── GetById │ │ │ │ └── GetByIdApplicantResponse.cs │ │ ├── Blacklists │ │ │ ├── Resources │ │ │ │ └── Locales │ │ │ │ │ └── Blacklists.en.yaml │ │ │ ├── Commands │ │ │ │ ├── Delete │ │ │ │ │ ├── DeletedBlacklistResponse.cs │ │ │ │ │ └── DeletedBlacklistCommandValidator.cs │ │ │ │ ├── Create │ │ │ │ │ ├── CreatedBlacklistResponse.cs │ │ │ │ │ └── CreateBlacklistCommandValidator.cs │ │ │ │ └── Update │ │ │ │ │ ├── UpdatedBlacklistResponse.cs │ │ │ │ │ └── UpdateBlacklistCommandValidator.cs │ │ │ ├── Constants │ │ │ │ ├── BlacklistsBusinessMessages.cs │ │ │ │ └── BlacklistsOperationClaims.cs │ │ │ └── Queries │ │ │ │ ├── GetList │ │ │ │ └── GetListBlacklistListItemDto.cs │ │ │ │ └── GetById │ │ │ │ └── GetByIdBlacklistResponse.cs │ │ ├── Bootcamps │ │ │ ├── Resources │ │ │ │ └── Locales │ │ │ │ │ └── Bootcamps.en.yaml │ │ │ ├── Commands │ │ │ │ ├── Update │ │ │ │ │ ├── UpdateBootcampCommand.cs │ │ │ │ │ ├── UpdateBootcampCommandValidator.cs │ │ │ │ │ └── UpdatedBootcampResponse.cs │ │ │ │ ├── Delete │ │ │ │ │ ├── DeletedBootcampResponse.cs │ │ │ │ │ └── DeletedBootcampCommandValidator.cs │ │ │ │ └── Create │ │ │ │ │ ├── CreateBootcampCommandValidator.cs │ │ │ │ │ └── CreatedBootcampResponse.cs │ │ │ ├── Constants │ │ │ │ ├── BootcampsBusinessMessages.cs │ │ │ │ └── BootcampsOperationClaims.cs │ │ │ └── Queries │ │ │ │ ├── GetList │ │ │ │ └── GetListBootcampListItemDto.cs │ │ │ │ └── GetById │ │ │ │ └── GetByIdBootcampResponse.cs │ │ ├── Employees │ │ │ ├── Resources │ │ │ │ └── Locales │ │ │ │ │ └── Employees.en.yaml │ │ │ ├── Constants │ │ │ │ ├── EmployeesBusinessMessages.cs │ │ │ │ └── EmployeesOperationClaims.cs │ │ │ ├── Commands │ │ │ │ ├── Delete │ │ │ │ │ ├── DeletedEmployeeCommandValidator.cs │ │ │ │ │ └── DeletedEmployeeResponse.cs │ │ │ │ ├── Create │ │ │ │ │ ├── CreateEmployeeCommandValidator.cs │ │ │ │ │ └── CreatedEmployeeResponse.cs │ │ │ │ └── Update │ │ │ │ │ ├── UpdateEmployeeCommandValidator.cs │ │ │ │ │ └── UpdatedEmployeeResponse.cs │ │ │ └── Queries │ │ │ │ ├── GetList │ │ │ │ └── GetListEmployeeListItemDto.cs │ │ │ │ └── GetById │ │ │ │ └── GetByIdEmployeeResponse.cs │ │ ├── Instructors │ │ │ ├── Resources │ │ │ │ └── Locales │ │ │ │ │ └── Instructors.en.yaml │ │ │ ├── Constants │ │ │ │ ├── InstructorsBusinessMessages.cs │ │ │ │ └── InstructorsOperationClaims.cs │ │ │ ├── Commands │ │ │ │ ├── Delete │ │ │ │ │ ├── DeletedInstructorCommandValidator.cs │ │ │ │ │ └── DeletedInstructorResponse.cs │ │ │ │ ├── Create │ │ │ │ │ ├── CreateInstructorCommandValidator.cs │ │ │ │ │ └── CreatedInstructorResponse.cs │ │ │ │ └── Update │ │ │ │ │ ├── UpdateInstructorCommandValidator.cs │ │ │ │ │ └── UpdatedInstructorResponse.cs │ │ │ └── Queries │ │ │ │ ├── GetList │ │ │ │ └── GetListInstructorListItemDto.cs │ │ │ │ └── GetById │ │ │ │ └── GetByIdInstructorResponse.cs │ │ ├── Announcements │ │ │ ├── Resources │ │ │ │ └── Locales │ │ │ │ │ └── Announcements.en.yaml │ │ │ ├── Commands │ │ │ │ ├── Delete │ │ │ │ │ ├── DeletedAnnouncementResponse.cs │ │ │ │ │ └── DeletedAnnouncementCommandValidator.cs │ │ │ │ ├── Create │ │ │ │ │ ├── CreatedAnnouncementResponse.cs │ │ │ │ │ └── CreateAnnouncementCommandValidator.cs │ │ │ │ └── Update │ │ │ │ │ ├── UpdatedAnnouncementResponse.cs │ │ │ │ │ └── UpdateAnnouncementCommandValidator.cs │ │ │ ├── Constants │ │ │ │ ├── AnnouncementsBusinessMessages.cs │ │ │ │ └── AnnouncementsOperationClaims.cs │ │ │ └── Queries │ │ │ │ ├── GetList │ │ │ │ └── GetListAnnouncementListItemDto.cs │ │ │ │ └── GetById │ │ │ │ └── GetByIdAnnouncementResponse.cs │ │ ├── BootcampLogs │ │ │ ├── Resources │ │ │ │ └── Locales │ │ │ │ │ └── BootcampLogs.en.yaml │ │ │ ├── Commands │ │ │ │ ├── Delete │ │ │ │ │ ├── DeletedBootcampLogResponse.cs │ │ │ │ │ └── DeletedBootcampLogCommandValidator.cs │ │ │ │ ├── Create │ │ │ │ │ ├── CreatedBootcampLogResponse.cs │ │ │ │ │ └── CreateBootcampLogCommandValidator.cs │ │ │ │ └── Update │ │ │ │ │ ├── UpdatedBootcampLogResponse.cs │ │ │ │ │ └── UpdateBootcampLogCommandValidator.cs │ │ │ ├── Constants │ │ │ │ ├── BootcampLogsBusinessMessages.cs │ │ │ │ └── BootcampLogsOperationClaims.cs │ │ │ └── Queries │ │ │ │ ├── GetList │ │ │ │ └── GetListBootcampLogListItemDto.cs │ │ │ │ └── GetById │ │ │ │ └── GetByIdBootcampLogResponse.cs │ │ ├── Certificates │ │ │ ├── Resources │ │ │ │ └── Locales │ │ │ │ │ └── Certificates.en.yaml │ │ │ ├── Commands │ │ │ │ ├── Create │ │ │ │ │ ├── CreateCertificateCommand.cs │ │ │ │ │ ├── CreatedCertificateResponse.cs │ │ │ │ │ ├── CreateCertificateDto.cs │ │ │ │ │ └── CreateCertificateCommandValidator.cs │ │ │ │ ├── Delete │ │ │ │ │ ├── DeletedCertificateResponse.cs │ │ │ │ │ └── DeletedCertificateCommandValidator.cs │ │ │ │ └── Update │ │ │ │ │ ├── UpdatedCertificateResponse.cs │ │ │ │ │ └── UpdateCertificateCommandValidator.cs │ │ │ ├── Constants │ │ │ │ ├── CertificatesBusinessMessages.cs │ │ │ │ └── CertificatesOperationClaims.cs │ │ │ └── Queries │ │ │ │ ├── GetList │ │ │ │ └── GetListCertificateListItemDto.cs │ │ │ │ └── GetById │ │ │ │ └── GetByIdCertificateResponse.cs │ │ ├── BootcampImages │ │ │ ├── Resources │ │ │ │ └── Locales │ │ │ │ │ └── BootcampImages.en.yaml │ │ │ ├── Commands │ │ │ │ ├── Delete │ │ │ │ │ ├── DeletedBootcampImageResponse.cs │ │ │ │ │ └── DeletedBootcampImageCommandValidator.cs │ │ │ │ ├── Create │ │ │ │ │ ├── CreatedBootcampImageResponse.cs │ │ │ │ │ └── CreateBootcampImageCommandValidator.cs │ │ │ │ └── Update │ │ │ │ │ ├── UpdatedBootcampImageResponse.cs │ │ │ │ │ └── UpdateBootcampImageCommandValidator.cs │ │ │ ├── Constants │ │ │ │ ├── BootcampImagesBusinessMessages.cs │ │ │ │ └── BootcampImagesOperationClaims.cs │ │ │ └── Queries │ │ │ │ ├── GetList │ │ │ │ └── GetListBootcampImageListItemDto.cs │ │ │ │ └── GetById │ │ │ │ └── GetByIdBootcampImageResponse.cs │ │ ├── BootcampStates │ │ │ ├── Resources │ │ │ │ └── Locales │ │ │ │ │ └── BootcampStates.en.yaml │ │ │ ├── Commands │ │ │ │ ├── Delete │ │ │ │ │ ├── DeletedBootcampStateResponse.cs │ │ │ │ │ └── DeletedBootcampStateCommandValidator.cs │ │ │ │ ├── Create │ │ │ │ │ ├── CreatedBootcampStateResponse.cs │ │ │ │ │ └── CreateBootcampStateCommandValidator.cs │ │ │ │ └── Update │ │ │ │ │ ├── UpdatedBootcampStateResponse.cs │ │ │ │ │ └── UpdateBootcampStateCommandValidator.cs │ │ │ ├── Constants │ │ │ │ ├── BootcampStatesBusinessMessages.cs │ │ │ │ └── BootcampStatesOperationClaims.cs │ │ │ └── Queries │ │ │ │ ├── GetList │ │ │ │ └── GetListBootcampStateListItemDto.cs │ │ │ │ └── GetById │ │ │ │ └── GetByIdBootcampStateResponse.cs │ │ ├── ApplicationInformations │ │ │ ├── Resources │ │ │ │ └── Locales │ │ │ │ │ └── ApplicationInformations.en.yaml │ │ │ ├── Commands │ │ │ │ ├── Delete │ │ │ │ │ ├── DeletedApplicationInformationResponse.cs │ │ │ │ │ └── DeletedApplicationInformationCommandValidator.cs │ │ │ │ ├── Create │ │ │ │ │ ├── CreateApplicationInformationCommandValidator.cs │ │ │ │ │ └── CreatedApplicationInformationResponse.cs │ │ │ │ └── Update │ │ │ │ │ ├── UpdateApplicationInformationCommandValidator.cs │ │ │ │ │ └── UpdatedApplicationInformationResponse.cs │ │ │ ├── Constants │ │ │ │ ├── ApplicationInformationsBusinessMessages.cs │ │ │ │ └── ApplicationInformationsOperationClaims.cs │ │ │ └── Queries │ │ │ │ ├── GetList │ │ │ │ └── GetListApplicationInformationListItemDto.cs │ │ │ │ └── GetById │ │ │ │ └── GetByIdApplicationInformationResponse.cs │ │ ├── OperationClaims │ │ │ ├── Resources │ │ │ │ └── Locales │ │ │ │ │ ├── operation-claims.tr.yaml │ │ │ │ │ └── operation-claims.en.yaml │ │ │ ├── Commands │ │ │ │ ├── Delete │ │ │ │ │ └── DeletedOperationClaimResponse.cs │ │ │ │ ├── Create │ │ │ │ │ ├── CreateOperationClaimCommandValidator.cs │ │ │ │ │ └── CreatedOperationClaimResponse.cs │ │ │ │ └── Update │ │ │ │ │ ├── UpdateOperationClaimCommandValidator.cs │ │ │ │ │ └── UpdatedOperationClaimResponse.cs │ │ │ ├── Constants │ │ │ │ ├── OperationClaimsMessages.cs │ │ │ │ └── OperationClaimsOperationClaims.cs │ │ │ └── Queries │ │ │ │ ├── GetById │ │ │ │ └── GetByIdOperationClaimResponse.cs │ │ │ │ └── GetList │ │ │ │ └── GetListOperationClaimListItemDto.cs │ │ ├── ApplicationStateInformations │ │ │ ├── Resources │ │ │ │ └── Locales │ │ │ │ │ └── ApplicationStateInformations.en.yaml │ │ │ ├── Queries │ │ │ │ ├── GetList │ │ │ │ │ └── GetListApplicationStateInformationListItemDto.cs │ │ │ │ └── GetById │ │ │ │ │ └── GetByIdApplicationStateInformationResponse.cs │ │ │ ├── Commands │ │ │ │ ├── Create │ │ │ │ │ ├── CreatedApplicationStateInformationResponse.cs │ │ │ │ │ └── CreateApplicationStateInformationCommandValidator.cs │ │ │ │ ├── Delete │ │ │ │ │ ├── DeletedApplicationStateInformationResponse.cs │ │ │ │ │ └── DeletedApplicationStateInformationCommandValidator.cs │ │ │ │ └── Update │ │ │ │ │ ├── UpdatedApplicationStateInformationResponse.cs │ │ │ │ │ └── UpdateApplicationStateInformationCommandValidator.cs │ │ │ └── Constants │ │ │ │ ├── ApplicationStateInformationsBusinessMessages.cs │ │ │ │ └── ApplicationStateInformationsOperationClaims.cs │ │ ├── Users │ │ │ ├── Resources │ │ │ │ └── Locales │ │ │ │ │ ├── users.en.yaml │ │ │ │ │ └── users.tr.yaml │ │ │ ├── Commands │ │ │ │ ├── Update │ │ │ │ │ ├── UpdateUserCommand.cs │ │ │ │ │ ├── UpdatedUserResponse.cs │ │ │ │ │ └── UpdateUserCommandValidator.cs │ │ │ │ ├── Create │ │ │ │ │ ├── CreatedUserResponse.cs │ │ │ │ │ └── CreateUserCommandValidator.cs │ │ │ │ ├── Delete │ │ │ │ │ └── DeletedUserResponse.cs │ │ │ │ └── UpdateFromAuth │ │ │ │ │ ├── UpdatedUserFromAuthResponse.cs │ │ │ │ │ └── UpdateUserFromAuthCommandValidator.cs │ │ │ ├── Constants │ │ │ │ ├── UsersMessages.cs │ │ │ │ └── UsersOperationClaims.cs │ │ │ └── Queries │ │ │ │ ├── GetList │ │ │ │ └── GetListUserListItemDto.cs │ │ │ │ └── GetById │ │ │ │ └── GetByIdUserResponse.cs │ │ ├── Auth │ │ │ ├── Rules │ │ │ │ └── AuthBusinessRules.cs │ │ │ ├── Commands │ │ │ │ ├── ResetPassword │ │ │ │ │ ├── ResetPasswordCommandValidator.cs │ │ │ │ │ └── ResetPasswordDto.cs │ │ │ │ ├── ForgotPassword │ │ │ │ │ └── ForgotPasswordDto.cs │ │ │ │ ├── Register │ │ │ │ │ ├── ApplicantRegisterDto.cs │ │ │ │ │ ├── EmployeeRegisterDto.cs │ │ │ │ │ ├── InstructorRegisterDto.cs │ │ │ │ │ ├── RegisterDto.cs │ │ │ │ │ ├── RegisteredResponse.cs │ │ │ │ │ └── RegisterCommandValidator.cs │ │ │ │ ├── Login │ │ │ │ │ ├── LoginCommandValidator.cs │ │ │ │ │ └── LoggedResponse.cs │ │ │ │ ├── RevokeToken │ │ │ │ │ └── RevokedTokenResponse.cs │ │ │ │ ├── EnableOtpAuthenticator │ │ │ │ │ └── EnabledOtpAuthenticatorResponse.cs │ │ │ │ └── RefreshToken │ │ │ │ │ └── RefreshedTokensResponse.cs │ │ │ ├── Constants │ │ │ │ ├── AuthOperationClaims.cs │ │ │ │ └── AuthMessages.cs │ │ │ ├── Profiles │ │ │ │ └── MappingProfiles.cs │ │ │ └── Resources │ │ │ │ └── Locales │ │ │ │ └── auth.en.yaml │ │ └── UserOperationClaims │ │ │ ├── Resources │ │ │ └── Locales │ │ │ │ ├── user-operation-claims.tr.yaml │ │ │ │ └── user-operation-claims.en.yaml │ │ │ ├── Commands │ │ │ ├── Delete │ │ │ │ └── DeletedUserOperationClaimResponse.cs │ │ │ ├── Create │ │ │ │ ├── CreatedUserOperationClaimResponse.cs │ │ │ │ └── CreateUserOperationClaimCommandValidator.cs │ │ │ └── Update │ │ │ │ ├── UpdatedUserOperationClaimResponse.cs │ │ │ │ └── UpdateUserOperationClaimCommandValidator.cs │ │ │ ├── Queries │ │ │ ├── GetList │ │ │ │ └── GetListUserOperationClaimListItemDto.cs │ │ │ └── GetById │ │ │ │ └── GetByIdUserOperationClaimResponse.cs │ │ │ └── Constants │ │ │ ├── UserOperationClaimsMessages.cs │ │ │ └── UserOperationClaimsOperationClaims.cs │ └── Services │ │ ├── TranslateService │ │ └── ITranslateService.cs │ │ ├── Repositories │ │ ├── IUserRepository.cs │ │ ├── IChapterRepository.cs │ │ ├── ICommentRepository.cs │ │ ├── IBlacklistRepository.cs │ │ ├── IBootcampRepository.cs │ │ ├── IEmployeeRepository.cs │ │ ├── IApplicantRepository.cs │ │ ├── IInstructorRepository.cs │ │ ├── IAnnouncementRepository.cs │ │ ├── IBootcampLogRepository.cs │ │ ├── ICertificateRepository.cs │ │ ├── IBootcampImageRepository.cs │ │ ├── IBootcampStateRepository.cs │ │ ├── IOperationClaimRepository.cs │ │ ├── IOtpAuthenticatorRepository.cs │ │ ├── IEmailAuthenticatorRepository.cs │ │ ├── IApplicationInformationRepository.cs │ │ ├── IApplicationStateInformationRepository.cs │ │ ├── IRefreshTokenRepository.cs │ │ └── IUserOperationClaimRepository.cs │ │ ├── AuthenticatorService │ │ └── IAuthenticatorService.cs │ │ ├── AuthService │ │ └── IAuthService.cs │ │ ├── ImageService │ │ └── ImageServiceBase.cs │ │ ├── UsersService │ │ └── IUserService.cs │ │ └── Chapters │ │ └── IChapterService.cs │ ├── Domain │ ├── Entities │ │ ├── OperationClaim.cs │ │ ├── RefreshToken.cs │ │ ├── OtpAuthenticator.cs │ │ ├── UserOperationClaim.cs │ │ ├── EmailAuthenticator.cs │ │ ├── BootcampState.cs │ │ ├── ApplicationStateInformation.cs │ │ ├── Announcement.cs │ │ ├── Employee.cs │ │ ├── Applicant.cs │ │ ├── BootcampLog.cs │ │ ├── BootcampImage.cs │ │ ├── Instructor.cs │ │ ├── Blacklist.cs │ │ ├── ContactFormModel.cs │ │ ├── Certificate.cs │ │ ├── Comment.cs │ │ ├── Chapter.cs │ │ ├── User.cs │ │ └── ApplicationInformation.cs │ └── Domain.csproj │ ├── Persistence │ ├── Repositories │ │ ├── UserRepository.cs │ │ ├── ChapterRepository.cs │ │ ├── CommentRepository.cs │ │ ├── BootcampRepository.cs │ │ ├── EmployeeRepository.cs │ │ ├── ApplicantRepository.cs │ │ ├── BlacklistRepository.cs │ │ ├── InstructorRepository.cs │ │ ├── BootcampLogRepository.cs │ │ ├── CertificateRepository.cs │ │ ├── AnnouncementRepository.cs │ │ ├── BootcampImageRepository.cs │ │ ├── BootcampStateRepository.cs │ │ ├── OperationClaimRepository.cs │ │ ├── OtpAuthenticatorRepository.cs │ │ ├── EmailAuthenticatorRepository.cs │ │ ├── ApplicationInformationRepository.cs │ │ ├── ApplicationStateInformationRepository.cs │ │ ├── UserOperationClaimRepository.cs │ │ └── RefreshTokenRepository.cs │ ├── EntityConfigurations │ │ ├── EmployeeConfiguration.cs │ │ ├── ApplicantConfiguration.cs │ │ ├── InstructorConfiguration.cs │ │ ├── BootcampImageConfiguration.cs │ │ ├── AnnouncementConfiguration.cs │ │ ├── CertificateConfiguration.cs │ │ ├── BlacklistConfiguration.cs │ │ ├── CommentConfiguration.cs │ │ ├── BootcampLogConfiguration.cs │ │ ├── OtpAuthenticatorConfiguration.cs │ │ └── EmailAuthenticatorConfiguration.cs │ └── Persistence.csproj │ └── Infrastructure │ ├── InfrastructureServiceRegistration.cs │ └── Infrastructure.csproj ├── ElasticSearch ├── ElasticSearch.http ├── appsettings.Development.json ├── appsettings.json ├── ElasticSearch.csproj ├── WeatherForecast.cs ├── Program.cs ├── Properties │ └── launchSettings.json └── Controllers │ └── WeatherForecastController.cs ├── .csharpierrc ├── NArchBootcampProject.sln.DotSettings ├── .config └── dotnet-tools.json ├── .github └── workflows │ └── dotnet.yml └── LICENSE /tests/NArchBootcampProject.Application.Tests/Usings.cs: -------------------------------------------------------------------------------- 1 | global using Xunit; 2 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/WebAPI/GeneratedCertificates/1752e100-97a3-44cd-86e6-bac7bd5e038c.pdf: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/WebAPI/GeneratedCertificates/2a1c463b-4ba2-4cee-8108-24b5cf74f70c.pdf: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/WebAPI/GeneratedCertificates/2e4bf1ae-8b47-4d2b-859d-f355d62e828a.pdf: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/WebAPI/GeneratedCertificates/386a7c3e-fd78-43a1-846e-70acb7360403.pdf: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/WebAPI/GeneratedCertificates/f9547d2b-be2b-479d-8f51-0ae8e5e08bb9.pdf: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Chapters/Resources/Locales/Chapters.en.yaml: -------------------------------------------------------------------------------- 1 | ChapterNotExists: "Chapter don't exists." -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Comments/Resources/Locales/Comments.en.yaml: -------------------------------------------------------------------------------- 1 | CommentNotExists: "Comment don't exists." -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Applicants/Resources/Locales/Applicants.en.yaml: -------------------------------------------------------------------------------- 1 | ApplicantNotExists: "Applicant don't exists." -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Blacklists/Resources/Locales/Blacklists.en.yaml: -------------------------------------------------------------------------------- 1 | BlacklistNotExists: "Blacklist don't exists." -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Bootcamps/Resources/Locales/Bootcamps.en.yaml: -------------------------------------------------------------------------------- 1 | BootcampNotExists: "Bootcamp don't exists." -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Employees/Resources/Locales/Employees.en.yaml: -------------------------------------------------------------------------------- 1 | EmployeeNotExists: "Employee don't exists." -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Instructors/Resources/Locales/Instructors.en.yaml: -------------------------------------------------------------------------------- 1 | InstructorNotExists: "İnstructor don't exists." -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Announcements/Resources/Locales/Announcements.en.yaml: -------------------------------------------------------------------------------- 1 | AnnouncementNotExists: Announcement don't exists. -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/BootcampLogs/Resources/Locales/BootcampLogs.en.yaml: -------------------------------------------------------------------------------- 1 | BootcampLogNotExists: "Bootcamp log don't exists." -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Certificates/Resources/Locales/Certificates.en.yaml: -------------------------------------------------------------------------------- 1 | CertificateNotExists: Certificate don't exists. -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/BootcampImages/Resources/Locales/BootcampImages.en.yaml: -------------------------------------------------------------------------------- 1 | BootcampImageNotExists: "Bootcamp image don't exists." -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/BootcampStates/Resources/Locales/BootcampStates.en.yaml: -------------------------------------------------------------------------------- 1 | BootcampStateNotExists: "Bootcamp state don't exists." -------------------------------------------------------------------------------- /ElasticSearch/ElasticSearch.http: -------------------------------------------------------------------------------- 1 | @ElasticSearch_HostAddress = http://localhost:5153 2 | 3 | GET {{ElasticSearch_HostAddress}}/weatherforecast/ 4 | Accept: application/json 5 | 6 | ### 7 | -------------------------------------------------------------------------------- /ElasticSearch/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/ApplicationInformations/Resources/Locales/ApplicationInformations.en.yaml: -------------------------------------------------------------------------------- 1 | ApplicationInformationNotExists: "Application information don't exists." -------------------------------------------------------------------------------- /src/nArchBootcampProject/Domain/Entities/OperationClaim.cs: -------------------------------------------------------------------------------- 1 | namespace Domain.Entities; 2 | 3 | public class OperationClaim : NArchitecture.Core.Security.Entities.OperationClaim { } 4 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/WebAPI/wwwroot/image/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/banudik/Tobeto3A-NArchitecture.BootcampProject/HEAD/src/nArchBootcampProject/WebAPI/wwwroot/image/logo.png -------------------------------------------------------------------------------- /src/nArchBootcampProject/WebAPI/wwwroot/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/banudik/Tobeto3A-NArchitecture.BootcampProject/HEAD/src/nArchBootcampProject/WebAPI/wwwroot/images/logo.png -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/OperationClaims/Resources/Locales/operation-claims.tr.yaml: -------------------------------------------------------------------------------- 1 | NotExists: "İşlem hakkı mevcut değil." 2 | AlreadyExists: "İşlem hakkı zaten mevcut." 3 | -------------------------------------------------------------------------------- /.csharpierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 130, 3 | "useTabs": false, 4 | "tabWidth": 4, 5 | "preprocessorSymbolSets": [ 6 | "", 7 | "DEBUG", 8 | "DEBUG,CODE_STYLE" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/OperationClaims/Resources/Locales/operation-claims.en.yaml: -------------------------------------------------------------------------------- 1 | NotExists: "Operation Claim not exists." 2 | AlreadyExists: "Operation Claim already exists." 3 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/ApplicationStateInformations/Resources/Locales/ApplicationStateInformations.en.yaml: -------------------------------------------------------------------------------- 1 | ApplicationStateInformationNotExists: "Application state information don't exists." -------------------------------------------------------------------------------- /ElasticSearch/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Users/Resources/Locales/users.en.yaml: -------------------------------------------------------------------------------- 1 | UserDontExists: "User don't exists." 2 | UserMailAlreadyExists: "User mail already exists." 3 | PasswordDontMatch: "Password don't match." -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Auth/Rules/AuthBusinessRules.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/banudik/Tobeto3A-NArchitecture.BootcampProject/HEAD/src/nArchBootcampProject/Application/Features/Auth/Rules/AuthBusinessRules.cs -------------------------------------------------------------------------------- /src/nArchBootcampProject/Domain/Entities/RefreshToken.cs: -------------------------------------------------------------------------------- 1 | namespace Domain.Entities; 2 | 3 | public class RefreshToken : NArchitecture.Core.Security.Entities.RefreshToken 4 | { 5 | public virtual User User { get; set; } = default!; 6 | } 7 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/UserOperationClaims/Resources/Locales/user-operation-claims.tr.yaml: -------------------------------------------------------------------------------- 1 | UserOperationClaimNotExists: "Kullanıcının işlem hakkı bulunmuyor." 2 | UserOperationClaimAlreadyExists: "Kullanıcının işlem hakkı zaten mevcut." -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Users/Commands/Update/UpdateUserCommand.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/banudik/Tobeto3A-NArchitecture.BootcampProject/HEAD/src/nArchBootcampProject/Application/Features/Users/Commands/Update/UpdateUserCommand.cs -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/UserOperationClaims/Resources/Locales/user-operation-claims.en.yaml: -------------------------------------------------------------------------------- 1 | UserOperationClaimNotExists: "The user hasn't the operation claim." 2 | UserOperationClaimAlreadyExists: "The user has the operation claim already." -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Users/Commands/Create/CreatedUserResponse.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/banudik/Tobeto3A-NArchitecture.BootcampProject/HEAD/src/nArchBootcampProject/Application/Features/Users/Commands/Create/CreatedUserResponse.cs -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Users/Commands/Update/UpdatedUserResponse.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/banudik/Tobeto3A-NArchitecture.BootcampProject/HEAD/src/nArchBootcampProject/Application/Features/Users/Commands/Update/UpdatedUserResponse.cs -------------------------------------------------------------------------------- /src/nArchBootcampProject/Domain/Entities/OtpAuthenticator.cs: -------------------------------------------------------------------------------- 1 | namespace Domain.Entities; 2 | 3 | public class OtpAuthenticator : NArchitecture.Core.Security.Entities.OtpAuthenticator 4 | { 5 | public virtual User User { get; set; } = default!; 6 | } 7 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/WebAPI/GeneratedCertificates/0e22646c-b48b-4c96-a86a-2080cb4f7e27.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/banudik/Tobeto3A-NArchitecture.BootcampProject/HEAD/src/nArchBootcampProject/WebAPI/GeneratedCertificates/0e22646c-b48b-4c96-a86a-2080cb4f7e27.pdf -------------------------------------------------------------------------------- /src/nArchBootcampProject/WebAPI/GeneratedCertificates/1355855c-bb11-4a1c-8b5d-3096c775f937.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/banudik/Tobeto3A-NArchitecture.BootcampProject/HEAD/src/nArchBootcampProject/WebAPI/GeneratedCertificates/1355855c-bb11-4a1c-8b5d-3096c775f937.pdf -------------------------------------------------------------------------------- /src/nArchBootcampProject/WebAPI/GeneratedCertificates/344bb3ba-1bf7-4f5e-a9b0-826d6a28dfbd.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/banudik/Tobeto3A-NArchitecture.BootcampProject/HEAD/src/nArchBootcampProject/WebAPI/GeneratedCertificates/344bb3ba-1bf7-4f5e-a9b0-826d6a28dfbd.pdf -------------------------------------------------------------------------------- /src/nArchBootcampProject/WebAPI/GeneratedCertificates/39ee5408-010a-4c34-b405-431d2bbe2543.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/banudik/Tobeto3A-NArchitecture.BootcampProject/HEAD/src/nArchBootcampProject/WebAPI/GeneratedCertificates/39ee5408-010a-4c34-b405-431d2bbe2543.pdf -------------------------------------------------------------------------------- /src/nArchBootcampProject/WebAPI/GeneratedCertificates/497dff29-cdb4-44f0-accc-bafd57fc9255.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/banudik/Tobeto3A-NArchitecture.BootcampProject/HEAD/src/nArchBootcampProject/WebAPI/GeneratedCertificates/497dff29-cdb4-44f0-accc-bafd57fc9255.pdf -------------------------------------------------------------------------------- /src/nArchBootcampProject/WebAPI/GeneratedCertificates/4a7e660f-a263-42cb-bc1a-09033de0f157.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/banudik/Tobeto3A-NArchitecture.BootcampProject/HEAD/src/nArchBootcampProject/WebAPI/GeneratedCertificates/4a7e660f-a263-42cb-bc1a-09033de0f157.pdf -------------------------------------------------------------------------------- /src/nArchBootcampProject/WebAPI/GeneratedCertificates/4f7ae83b-595d-45b6-82ce-79e9586496cf.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/banudik/Tobeto3A-NArchitecture.BootcampProject/HEAD/src/nArchBootcampProject/WebAPI/GeneratedCertificates/4f7ae83b-595d-45b6-82ce-79e9586496cf.pdf -------------------------------------------------------------------------------- /src/nArchBootcampProject/WebAPI/GeneratedCertificates/588d6cde-c57f-4900-81ac-3ca33d8208bb.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/banudik/Tobeto3A-NArchitecture.BootcampProject/HEAD/src/nArchBootcampProject/WebAPI/GeneratedCertificates/588d6cde-c57f-4900-81ac-3ca33d8208bb.pdf -------------------------------------------------------------------------------- /src/nArchBootcampProject/WebAPI/GeneratedCertificates/7a28d793-5d47-4436-b99a-955c7b7721b6.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/banudik/Tobeto3A-NArchitecture.BootcampProject/HEAD/src/nArchBootcampProject/WebAPI/GeneratedCertificates/7a28d793-5d47-4436-b99a-955c7b7721b6.pdf -------------------------------------------------------------------------------- /src/nArchBootcampProject/WebAPI/GeneratedCertificates/81387b1e-fba0-426e-9372-56c6d7b47ca2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/banudik/Tobeto3A-NArchitecture.BootcampProject/HEAD/src/nArchBootcampProject/WebAPI/GeneratedCertificates/81387b1e-fba0-426e-9372-56c6d7b47ca2.pdf -------------------------------------------------------------------------------- /src/nArchBootcampProject/WebAPI/GeneratedCertificates/98396c11-497a-4929-b388-4f6b4e942c07.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/banudik/Tobeto3A-NArchitecture.BootcampProject/HEAD/src/nArchBootcampProject/WebAPI/GeneratedCertificates/98396c11-497a-4929-b388-4f6b4e942c07.pdf -------------------------------------------------------------------------------- /src/nArchBootcampProject/WebAPI/GeneratedCertificates/99fc1f3e-01ba-424a-a2e0-4d64845a8495.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/banudik/Tobeto3A-NArchitecture.BootcampProject/HEAD/src/nArchBootcampProject/WebAPI/GeneratedCertificates/99fc1f3e-01ba-424a-a2e0-4d64845a8495.pdf -------------------------------------------------------------------------------- /src/nArchBootcampProject/WebAPI/GeneratedCertificates/a4fe9ddc-bcb8-4c80-8a9e-86a1c70612a1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/banudik/Tobeto3A-NArchitecture.BootcampProject/HEAD/src/nArchBootcampProject/WebAPI/GeneratedCertificates/a4fe9ddc-bcb8-4c80-8a9e-86a1c70612a1.pdf -------------------------------------------------------------------------------- /src/nArchBootcampProject/WebAPI/GeneratedCertificates/b024fb66-60bf-4887-acc3-e4b447d131b8.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/banudik/Tobeto3A-NArchitecture.BootcampProject/HEAD/src/nArchBootcampProject/WebAPI/GeneratedCertificates/b024fb66-60bf-4887-acc3-e4b447d131b8.pdf -------------------------------------------------------------------------------- /src/nArchBootcampProject/WebAPI/GeneratedCertificates/ddea959b-f851-4893-a815-5ff46b9a786d.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/banudik/Tobeto3A-NArchitecture.BootcampProject/HEAD/src/nArchBootcampProject/WebAPI/GeneratedCertificates/ddea959b-f851-4893-a815-5ff46b9a786d.pdf -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Bootcamps/Commands/Update/UpdateBootcampCommand.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/banudik/Tobeto3A-NArchitecture.BootcampProject/HEAD/src/nArchBootcampProject/Application/Features/Bootcamps/Commands/Update/UpdateBootcampCommand.cs -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Certificates/Commands/Create/CreateCertificateCommand.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/banudik/Tobeto3A-NArchitecture.BootcampProject/HEAD/src/nArchBootcampProject/Application/Features/Certificates/Commands/Create/CreateCertificateCommand.cs -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Services/TranslateService/ITranslateService.cs: -------------------------------------------------------------------------------- 1 | namespace Application.Services.TranslateService; 2 | 3 | public interface ITranslateService 4 | { 5 | public Task TranslateAsync(string text, string? to = null, string from = "en"); 6 | } 7 | -------------------------------------------------------------------------------- /ElasticSearch/ElasticSearch.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Chapters/Commands/Delete/DeletedChapterResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Chapters.Commands.Delete; 4 | 5 | public class DeletedChapterResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Comments/Commands/Delete/DeletedCommentResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Comments.Commands.Delete; 4 | 5 | public class DeletedCommentResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Services/Repositories/IUserRepository.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using NArchitecture.Core.Persistence.Repositories; 3 | 4 | namespace Application.Services.Repositories; 5 | 6 | public interface IUserRepository : IAsyncRepository, IRepository { } 7 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Bootcamps/Commands/Delete/DeletedBootcampResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Bootcamps.Commands.Delete; 4 | 5 | public class DeletedBootcampResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | } 9 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Blacklists/Commands/Delete/DeletedBlacklistResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Blacklists.Commands.Delete; 4 | 5 | public class DeletedBlacklistResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | } 9 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Services/Repositories/IChapterRepository.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using NArchitecture.Core.Persistence.Repositories; 3 | 4 | namespace Application.Services.Repositories; 5 | 6 | public interface IChapterRepository : IAsyncRepository, IRepository 7 | { 8 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Services/Repositories/ICommentRepository.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using NArchitecture.Core.Persistence.Repositories; 3 | 4 | namespace Application.Services.Repositories; 5 | 6 | public interface ICommentRepository : IAsyncRepository, IRepository 7 | { 8 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/BootcampLogs/Commands/Delete/DeletedBootcampLogResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.BootcampLogs.Commands.Delete; 4 | 5 | public class DeletedBootcampLogResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Certificates/Commands/Create/CreatedCertificateResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Certificates.Commands.Create; 4 | 5 | public class CreatedCertificateResponse : IResponse 6 | { 7 | public Guid Id { get; set; } 8 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Certificates/Commands/Delete/DeletedCertificateResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Certificates.Commands.Delete; 4 | 5 | public class DeletedCertificateResponse : IResponse 6 | { 7 | public Guid Id { get; set; } 8 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Chapters/Constants/ChaptersBusinessMessages.cs: -------------------------------------------------------------------------------- 1 | namespace Application.Features.Chapters.Constants; 2 | 3 | public static class ChaptersBusinessMessages 4 | { 5 | public const string SectionName = "Chapter"; 6 | 7 | public const string ChapterNotExists = "ChapterNotExists"; 8 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Comments/Constants/CommentsBusinessMessages.cs: -------------------------------------------------------------------------------- 1 | namespace Application.Features.Comments.Constants; 2 | 3 | public static class CommentsBusinessMessages 4 | { 5 | public const string SectionName = "Comment"; 6 | 7 | public const string CommentNotExists = "CommentNotExists"; 8 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Services/Repositories/IBlacklistRepository.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using NArchitecture.Core.Persistence.Repositories; 3 | 4 | namespace Application.Services.Repositories; 5 | 6 | public interface IBlacklistRepository : IAsyncRepository, IRepository { } 7 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Services/Repositories/IBootcampRepository.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using NArchitecture.Core.Persistence.Repositories; 3 | 4 | namespace Application.Services.Repositories; 5 | 6 | public interface IBootcampRepository : IAsyncRepository, IRepository { } 7 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Services/Repositories/IEmployeeRepository.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using NArchitecture.Core.Persistence.Repositories; 3 | 4 | namespace Application.Services.Repositories; 5 | 6 | public interface IEmployeeRepository : IAsyncRepository, IRepository { } 7 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Announcements/Commands/Delete/DeletedAnnouncementResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Announcements.Commands.Delete; 4 | 5 | public class DeletedAnnouncementResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Services/Repositories/IApplicantRepository.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using NArchitecture.Core.Persistence.Repositories; 3 | 4 | namespace Application.Services.Repositories; 5 | 6 | public interface IApplicantRepository : IAsyncRepository, IRepository { } 7 | -------------------------------------------------------------------------------- /ElasticSearch/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | namespace ElasticSearch; 2 | 3 | public class WeatherForecast 4 | { 5 | public DateOnly Date { get; set; } 6 | 7 | public int TemperatureC { get; set; } 8 | 9 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 10 | 11 | public string? Summary { get; set; } 12 | } 13 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/BootcampImages/Commands/Delete/DeletedBootcampImageResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.BootcampImages.Commands.Delete; 4 | 5 | public class DeletedBootcampImageResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | } 9 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Services/Repositories/IInstructorRepository.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using NArchitecture.Core.Persistence.Repositories; 3 | 4 | namespace Application.Services.Repositories; 5 | 6 | public interface IInstructorRepository : IAsyncRepository, IRepository { } 7 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/BootcampStates/Commands/Delete/DeletedBootcampStateResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.BootcampStates.Commands.Delete; 4 | 5 | public class DeletedBootcampStateResponse : IResponse 6 | { 7 | public short Id { get; set; } 8 | } 9 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Bootcamps/Constants/BootcampsBusinessMessages.cs: -------------------------------------------------------------------------------- 1 | namespace Application.Features.Bootcamps.Constants; 2 | 3 | public static class BootcampsBusinessMessages 4 | { 5 | public const string SectionName = "Bootcamp"; 6 | 7 | public const string BootcampNotExists = "BootcampNotExists"; 8 | } 9 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Employees/Constants/EmployeesBusinessMessages.cs: -------------------------------------------------------------------------------- 1 | namespace Application.Features.Employees.Constants; 2 | 3 | public static class EmployeesBusinessMessages 4 | { 5 | public const string SectionName = "Employee"; 6 | 7 | public const string EmployeeNotExists = "EmployeeNotExists"; 8 | } 9 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/OperationClaims/Commands/Delete/DeletedOperationClaimResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.OperationClaims.Commands.Delete; 4 | 5 | public class DeletedOperationClaimResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | } 9 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Services/Repositories/IAnnouncementRepository.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using NArchitecture.Core.Persistence.Repositories; 3 | 4 | namespace Application.Services.Repositories; 5 | 6 | public interface IAnnouncementRepository : IAsyncRepository, IRepository 7 | { 8 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Services/Repositories/IBootcampLogRepository.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using NArchitecture.Core.Persistence.Repositories; 3 | 4 | namespace Application.Services.Repositories; 5 | 6 | public interface IBootcampLogRepository : IAsyncRepository, IRepository 7 | { 8 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Services/Repositories/ICertificateRepository.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using NArchitecture.Core.Persistence.Repositories; 3 | 4 | namespace Application.Services.Repositories; 5 | 6 | public interface ICertificateRepository : IAsyncRepository, IRepository 7 | { 8 | } -------------------------------------------------------------------------------- /ElasticSearch/Program.cs: -------------------------------------------------------------------------------- 1 | var builder = WebApplication.CreateBuilder(args); 2 | 3 | // Add services to the container. 4 | 5 | builder.Services.AddControllers(); 6 | 7 | var app = builder.Build(); 8 | 9 | // Configure the HTTP request pipeline. 10 | 11 | app.UseAuthorization(); 12 | 13 | app.MapControllers(); 14 | 15 | app.Run(); 16 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Applicants/Constants/ApplicantsBusinessMessages.cs: -------------------------------------------------------------------------------- 1 | namespace Application.Features.Applicants.Constants; 2 | 3 | public static class ApplicantsBusinessMessages 4 | { 5 | public const string SectionName = "Applicant"; 6 | 7 | public const string ApplicantNotExists = "ApplicantNotExists"; 8 | } 9 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Blacklists/Constants/BlacklistsBusinessMessages.cs: -------------------------------------------------------------------------------- 1 | namespace Application.Features.Blacklists.Constants; 2 | 3 | public static class BlacklistsBusinessMessages 4 | { 5 | public const string SectionName = "Blacklist"; 6 | 7 | public const string BlacklistNotExists = "BlacklistNotExists"; 8 | } 9 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Services/Repositories/IBootcampImageRepository.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using NArchitecture.Core.Persistence.Repositories; 3 | 4 | namespace Application.Services.Repositories; 5 | 6 | public interface IBootcampImageRepository : IAsyncRepository, IRepository { } 7 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Services/Repositories/IBootcampStateRepository.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using NArchitecture.Core.Persistence.Repositories; 3 | 4 | namespace Application.Services.Repositories; 5 | 6 | public interface IBootcampStateRepository : IAsyncRepository, IRepository { } 7 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Services/Repositories/IOperationClaimRepository.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using NArchitecture.Core.Persistence.Repositories; 3 | 4 | namespace Application.Services.Repositories; 5 | 6 | public interface IOperationClaimRepository : IAsyncRepository, IRepository { } 7 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Domain/Entities/UserOperationClaim.cs: -------------------------------------------------------------------------------- 1 | namespace Domain.Entities; 2 | 3 | public class UserOperationClaim : NArchitecture.Core.Security.Entities.UserOperationClaim 4 | { 5 | public virtual User User { get; set; } = default!; 6 | public virtual OperationClaim OperationClaim { get; set; } = default!; 7 | } 8 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/BootcampLogs/Constants/BootcampLogsBusinessMessages.cs: -------------------------------------------------------------------------------- 1 | namespace Application.Features.BootcampLogs.Constants; 2 | 3 | public static class BootcampLogsBusinessMessages 4 | { 5 | public const string SectionName = "BootcampLog"; 6 | 7 | public const string BootcampLogNotExists = "BootcampLogNotExists"; 8 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Certificates/Constants/CertificatesBusinessMessages.cs: -------------------------------------------------------------------------------- 1 | namespace Application.Features.Certificates.Constants; 2 | 3 | public static class CertificatesBusinessMessages 4 | { 5 | public const string SectionName = "Certificate"; 6 | 7 | public const string CertificateNotExists = "CertificateNotExists"; 8 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Instructors/Constants/InstructorsBusinessMessages.cs: -------------------------------------------------------------------------------- 1 | namespace Application.Features.Instructors.Constants; 2 | 3 | public static class InstructorsBusinessMessages 4 | { 5 | public const string SectionName = "Instructor"; 6 | 7 | public const string InstructorNotExists = "InstructorNotExists"; 8 | } 9 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Services/Repositories/IOtpAuthenticatorRepository.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using NArchitecture.Core.Persistence.Repositories; 3 | 4 | namespace Application.Services.Repositories; 5 | 6 | public interface IOtpAuthenticatorRepository : IAsyncRepository, IRepository { } 7 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Announcements/Constants/AnnouncementsBusinessMessages.cs: -------------------------------------------------------------------------------- 1 | namespace Application.Features.Announcements.Constants; 2 | 3 | public static class AnnouncementsBusinessMessages 4 | { 5 | public const string SectionName = "Announcement"; 6 | 7 | public const string AnnouncementNotExists = "AnnouncementNotExists"; 8 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/UserOperationClaims/Commands/Delete/DeletedUserOperationClaimResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.UserOperationClaims.Commands.Delete; 4 | 5 | public class DeletedUserOperationClaimResponse : IResponse 6 | { 7 | public Guid Id { get; set; } 8 | } 9 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/ApplicationInformations/Commands/Delete/DeletedApplicationInformationResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.ApplicationInformations.Commands.Delete; 4 | 5 | public class DeletedApplicationInformationResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | } 9 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Auth/Commands/ResetPassword/ResetPasswordCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Application.Features.Auth.Commands.ForgotPassword; 8 | public class ResetPasswordCommandValidator 9 | { 10 | } 11 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/BootcampImages/Constants/BootcampImagesBusinessMessages.cs: -------------------------------------------------------------------------------- 1 | namespace Application.Features.BootcampImages.Constants; 2 | 3 | public static class BootcampImagesBusinessMessages 4 | { 5 | public const string SectionName = "BootcampImage"; 6 | 7 | public const string BootcampImageNotExists = "BootcampImageNotExists"; 8 | } 9 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/BootcampStates/Constants/BootcampStatesBusinessMessages.cs: -------------------------------------------------------------------------------- 1 | namespace Application.Features.BootcampStates.Constants; 2 | 3 | public static class BootcampStatesBusinessMessages 4 | { 5 | public const string SectionName = "BootcampState"; 6 | 7 | public const string BootcampStateNotExists = "BootcampStateNotExists"; 8 | } 9 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Users/Resources/Locales/users.tr.yaml: -------------------------------------------------------------------------------- 1 | # UserDontExists: "Kullanıcı bulunmuyor." 2 | # UserMailAlreadyExists: "Kullanıcı e-postası zaten mevcut." 3 | # PasswordDontMatch: "Parola eşleşmiyor." 4 | 5 | UserDontExists: "User don't exists." 6 | UserMailAlreadyExists: "User mail already exists." 7 | PasswordDontMatch: "Password don't match." 8 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Domain/Entities/EmailAuthenticator.cs: -------------------------------------------------------------------------------- 1 | namespace Domain.Entities; 2 | 3 | public class EmailAuthenticator : NArchitecture.Core.Security.Entities.EmailAuthenticator 4 | { 5 | public bool ResetPasswordToken { get; set; } 6 | public DateTime? ResetPasswordTokenExpiry { get; set; } 7 | public virtual User User { get; set; } = default!; 8 | } 9 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Services/Repositories/IEmailAuthenticatorRepository.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using NArchitecture.Core.Persistence.Repositories; 3 | 4 | namespace Application.Services.Repositories; 5 | 6 | public interface IEmailAuthenticatorRepository 7 | : IAsyncRepository, 8 | IRepository { } 9 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/BootcampStates/Commands/Create/CreatedBootcampStateResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.BootcampStates.Commands.Create; 4 | 5 | public class CreatedBootcampStateResponse : IResponse 6 | { 7 | public short Id { get; set; } 8 | public string Name { get; set; } 9 | } 10 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/BootcampStates/Commands/Update/UpdatedBootcampStateResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.BootcampStates.Commands.Update; 4 | 5 | public class UpdatedBootcampStateResponse : IResponse 6 | { 7 | public short Id { get; set; } 8 | public string Name { get; set; } 9 | } 10 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Auth/Commands/ForgotPassword/ForgotPasswordDto.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Application.Features.Auth.Commands.ForgotPassword; 8 | public class ForgotPasswordDto 9 | { 10 | public string Email { get; set; } 11 | } 12 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Auth/Commands/ResetPassword/ResetPasswordDto.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Application.Features.Auth.Commands.ForgotPassword; 8 | public class ResetPasswordDto 9 | { 10 | public string Password { get; set; } 11 | } 12 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Domain/Entities/BootcampState.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Persistence.Repositories; 2 | 3 | namespace Domain.Entities; 4 | 5 | public class BootcampState : Entity 6 | { 7 | public string Name { get; set; } 8 | 9 | public BootcampState() { } 10 | 11 | public BootcampState(string name) 12 | { 13 | Name = name; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Services/Repositories/IApplicationInformationRepository.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using NArchitecture.Core.Persistence.Repositories; 3 | 4 | namespace Application.Services.Repositories; 5 | 6 | public interface IApplicationInformationRepository 7 | : IAsyncRepository, 8 | IRepository { } 9 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Certificates/Commands/Create/CreateCertificateDto.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Application.Features.Certificates.Commands.Create; 8 | public class CreateCertificateDto 9 | { 10 | public int BootcampId { get; set; } 11 | } 12 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Auth/Commands/Register/ApplicantRegisterDto.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Application.Features.Auth.Commands.Register; 8 | 9 | public class ApplicantRegisterDto : RegisterDto 10 | { 11 | public string About { get; set; } 12 | } 13 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Auth/Commands/Register/EmployeeRegisterDto.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Application.Features.Auth.Commands.Register; 8 | 9 | public class EmployeeRegisterDto : RegisterDto 10 | { 11 | public string Position { get; set; } 12 | } 13 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/OperationClaims/Constants/OperationClaimsMessages.cs: -------------------------------------------------------------------------------- 1 | namespace Application.Features.OperationClaims.Constants; 2 | 3 | public static class OperationClaimsMessages 4 | { 5 | public const string SectionName = "OperationClaims"; 6 | 7 | public const string NotExists = "NotExists"; 8 | public const string AlreadyExists = "AlreadyExists"; 9 | } 10 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Chapters/Commands/Delete/DeletedChapterCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.Chapters.Commands.Delete; 4 | 5 | public class DeleteChapterCommandValidator : AbstractValidator 6 | { 7 | public DeleteChapterCommandValidator() 8 | { 9 | RuleFor(c => c.Id).NotEmpty(); 10 | } 11 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Comments/Commands/Delete/DeletedCommentCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.Comments.Commands.Delete; 4 | 5 | public class DeleteCommentCommandValidator : AbstractValidator 6 | { 7 | public DeleteCommentCommandValidator() 8 | { 9 | RuleFor(c => c.Id).NotEmpty(); 10 | } 11 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Certificates/Queries/GetList/GetListCertificateListItemDto.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Dtos; 2 | 3 | namespace Application.Features.Certificates.Queries.GetList; 4 | 5 | public class GetListCertificateListItemDto : IDto 6 | { 7 | public Guid Id { get; set; } 8 | public Guid ApplicantId { get; set; } 9 | public int BootcampId { get; set; } 10 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Bootcamps/Commands/Delete/DeletedBootcampCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.Bootcamps.Commands.Delete; 4 | 5 | public class DeleteBootcampCommandValidator : AbstractValidator 6 | { 7 | public DeleteBootcampCommandValidator() 8 | { 9 | RuleFor(c => c.Id).NotEmpty(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Certificates/Commands/Update/UpdatedCertificateResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Certificates.Commands.Update; 4 | 5 | public class UpdatedCertificateResponse : IResponse 6 | { 7 | public Guid Id { get; set; } 8 | public Guid ApplicantId { get; set; } 9 | public int BootcampId { get; set; } 10 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Certificates/Queries/GetById/GetByIdCertificateResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Certificates.Queries.GetById; 4 | 5 | public class GetByIdCertificateResponse : IResponse 6 | { 7 | public Guid Id { get; set; } 8 | public Guid ApplicantId { get; set; } 9 | public int BootcampId { get; set; } 10 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Employees/Commands/Delete/DeletedEmployeeCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.Employees.Commands.Delete; 4 | 5 | public class DeleteEmployeeCommandValidator : AbstractValidator 6 | { 7 | public DeleteEmployeeCommandValidator() 8 | { 9 | RuleFor(c => c.Id).NotEmpty(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Services/Repositories/IApplicationStateInformationRepository.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using NArchitecture.Core.Persistence.Repositories; 3 | 4 | namespace Application.Services.Repositories; 5 | 6 | public interface IApplicationStateInformationRepository 7 | : IAsyncRepository, 8 | IRepository { } 9 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Announcements/Commands/Create/CreatedAnnouncementResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Announcements.Commands.Create; 4 | 5 | public class CreatedAnnouncementResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | public string Header { get; set; } 9 | public string Description { get; set; } 10 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Announcements/Commands/Update/UpdatedAnnouncementResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Announcements.Commands.Update; 4 | 5 | public class UpdatedAnnouncementResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | public string Header { get; set; } 9 | public string Description { get; set; } 10 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Applicants/Commands/Delete/DeletedApplicantCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.Applicants.Commands.Delete; 4 | 5 | public class DeleteApplicantCommandValidator : AbstractValidator 6 | { 7 | public DeleteApplicantCommandValidator() 8 | { 9 | RuleFor(c => c.Id).NotEmpty(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Blacklists/Commands/Delete/DeletedBlacklistCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.Blacklists.Commands.Delete; 4 | 5 | public class DeleteBlacklistCommandValidator : AbstractValidator 6 | { 7 | public DeleteBlacklistCommandValidator() 8 | { 9 | RuleFor(c => c.Id).NotEmpty(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Employees/Commands/Create/CreateEmployeeCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.Employees.Commands.Create; 4 | 5 | public class CreateEmployeeCommandValidator : AbstractValidator 6 | { 7 | public CreateEmployeeCommandValidator() 8 | { 9 | RuleFor(c => c.Position).NotEmpty(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Applicants/Commands/Create/CreateApplicantCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.Applicants.Commands.Create; 4 | 5 | public class CreateApplicantCommandValidator : AbstractValidator 6 | { 7 | public CreateApplicantCommandValidator() 8 | { 9 | RuleFor(c => c.About).NotEmpty(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/BootcampImages/Queries/GetList/GetListBootcampImageListItemDto.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Dtos; 2 | 3 | namespace Application.Features.BootcampImages.Queries.GetList; 4 | 5 | public class GetListBootcampImageListItemDto : IDto 6 | { 7 | public int Id { get; set; } 8 | public int BootcampId { get; set; } 9 | public string ImagePath { get; set; } 10 | } 11 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/BootcampStates/Queries/GetList/GetListBootcampStateListItemDto.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Dtos; 2 | 3 | namespace Application.Features.BootcampStates.Queries.GetList; 4 | 5 | public class GetListBootcampStateListItemDto : IDto 6 | { 7 | public short Id { get; set; } 8 | public string Name { get; set; } 9 | public DateTime CreatedDate { get; set; } 10 | } 11 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/ApplicationStateInformations/Queries/GetList/GetListApplicationStateInformationListItemDto.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Dtos; 2 | 3 | namespace Application.Features.ApplicationStateInformations.Queries.GetList; 4 | 5 | public class GetListApplicationStateInformationListItemDto : IDto 6 | { 7 | public short Id { get; set; } 8 | public string Name { get; set; } 9 | } 10 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/BootcampImages/Commands/Create/CreatedBootcampImageResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.BootcampImages.Commands.Create; 4 | 5 | public class CreatedBootcampImageResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | public int BootcampId { get; set; } 9 | public string ImagePath { get; set; } 10 | } 11 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/BootcampImages/Commands/Update/UpdatedBootcampImageResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.BootcampImages.Commands.Update; 4 | 5 | public class UpdatedBootcampImageResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | public int BootcampId { get; set; } 9 | public string ImagePath { get; set; } 10 | } 11 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/BootcampImages/Queries/GetById/GetByIdBootcampImageResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.BootcampImages.Queries.GetById; 4 | 5 | public class GetByIdBootcampImageResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | public int BootcampId { get; set; } 9 | public string ImagePath { get; set; } 10 | } 11 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/BootcampLogs/Commands/Delete/DeletedBootcampLogCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.BootcampLogs.Commands.Delete; 4 | 5 | public class DeleteBootcampLogCommandValidator : AbstractValidator 6 | { 7 | public DeleteBootcampLogCommandValidator() 8 | { 9 | RuleFor(c => c.Id).NotEmpty(); 10 | } 11 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Certificates/Commands/Delete/DeletedCertificateCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.Certificates.Commands.Delete; 4 | 5 | public class DeleteCertificateCommandValidator : AbstractValidator 6 | { 7 | public DeleteCertificateCommandValidator() 8 | { 9 | RuleFor(c => c.Id).NotEmpty(); 10 | } 11 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Instructors/Commands/Delete/DeletedInstructorCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.Instructors.Commands.Delete; 4 | 5 | public class DeleteInstructorCommandValidator : AbstractValidator 6 | { 7 | public DeleteInstructorCommandValidator() 8 | { 9 | RuleFor(c => c.Id).NotEmpty(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Announcements/Commands/Delete/DeletedAnnouncementCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.Announcements.Commands.Delete; 4 | 5 | public class DeleteAnnouncementCommandValidator : AbstractValidator 6 | { 7 | public DeleteAnnouncementCommandValidator() 8 | { 9 | RuleFor(c => c.Id).NotEmpty(); 10 | } 11 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/ApplicationStateInformations/Commands/Create/CreatedApplicationStateInformationResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.ApplicationStateInformations.Commands.Create; 4 | 5 | public class CreatedApplicationStateInformationResponse : IResponse 6 | { 7 | public short Id { get; set; } 8 | public string Name { get; set; } 9 | } 10 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/ApplicationStateInformations/Commands/Delete/DeletedApplicationStateInformationResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.ApplicationStateInformations.Commands.Delete; 4 | 5 | public class DeletedApplicationStateInformationResponse : IResponse 6 | { 7 | public short Id { get; set; } 8 | public string Name { get; set; } 9 | } 10 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/ApplicationStateInformations/Commands/Update/UpdatedApplicationStateInformationResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.ApplicationStateInformations.Commands.Update; 4 | 5 | public class UpdatedApplicationStateInformationResponse : IResponse 6 | { 7 | public short Id { get; set; } 8 | public string Name { get; set; } 9 | } 10 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Instructors/Commands/Create/CreateInstructorCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.Instructors.Commands.Create; 4 | 5 | public class CreateInstructorCommandValidator : AbstractValidator 6 | { 7 | public CreateInstructorCommandValidator() 8 | { 9 | RuleFor(c => c.CompanyName).NotEmpty(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Users/Commands/Delete/DeletedUserResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Users.Commands.Delete; 4 | 5 | public class DeletedUserResponse : IResponse 6 | { 7 | public Guid Id { get; set; } 8 | public string UserName { get; set; } 9 | public string FirstName { get; set; } 10 | public string LastName { get; set; } 11 | } 12 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Services/Repositories/IRefreshTokenRepository.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using NArchitecture.Core.Persistence.Repositories; 3 | 4 | namespace Application.Services.Repositories; 5 | 6 | public interface IRefreshTokenRepository : IAsyncRepository, IRepository 7 | { 8 | Task> GetOldRefreshTokensAsync(Guid userId, int refreshTokenTTL); 9 | } 10 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Domain/Entities/ApplicationStateInformation.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Persistence.Repositories; 2 | 3 | namespace Domain.Entities; 4 | 5 | public class ApplicationStateInformation : Entity 6 | { 7 | public string Name { get; set; } 8 | 9 | public ApplicationStateInformation() { } 10 | 11 | public ApplicationStateInformation(string name) 12 | { 13 | Name = name; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /tests/NArchBootcampProject.Application.Tests/Startup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.DependencyInjection; 2 | using StarterProject.Application.Tests.DependencyResolvers; 3 | 4 | namespace StarterProject.Application.Tests; 5 | 6 | public sealed class Startup 7 | { 8 | public void ConfigureServices(IServiceCollection services) 9 | { 10 | services.AddUsersServices(); 11 | services.AddAuthServices(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/BootcampImages/Commands/Delete/DeletedBootcampImageCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.BootcampImages.Commands.Delete; 4 | 5 | public class DeleteBootcampImageCommandValidator : AbstractValidator 6 | { 7 | public DeleteBootcampImageCommandValidator() 8 | { 9 | RuleFor(c => c.Id).NotEmpty(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/BootcampStates/Commands/Create/CreateBootcampStateCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.BootcampStates.Commands.Create; 4 | 5 | public class CreateBootcampStateCommandValidator : AbstractValidator 6 | { 7 | public CreateBootcampStateCommandValidator() 8 | { 9 | RuleFor(c => c.Name).NotEmpty(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/BootcampStates/Commands/Delete/DeletedBootcampStateCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.BootcampStates.Commands.Delete; 4 | 5 | public class DeleteBootcampStateCommandValidator : AbstractValidator 6 | { 7 | public DeleteBootcampStateCommandValidator() 8 | { 9 | RuleFor(c => c.Id).NotEmpty(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/UserOperationClaims/Queries/GetList/GetListUserOperationClaimListItemDto.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Dtos; 2 | 3 | namespace Application.Features.UserOperationClaims.Queries.GetList; 4 | 5 | public class GetListUserOperationClaimListItemDto : IDto 6 | { 7 | public Guid Id { get; set; } 8 | public Guid UserId { get; set; } 9 | public int OperationClaimId { get; set; } 10 | } 11 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Users/Constants/UsersMessages.cs: -------------------------------------------------------------------------------- 1 | namespace Application.Features.Users.Constants; 2 | 3 | public static class UsersMessages 4 | { 5 | public const string SectionName = "Users"; 6 | 7 | public const string UserDontExists = "UserDontExists"; 8 | public const string PasswordDontMatch = "PasswordDontMatch"; 9 | public const string UserMailAlreadyExists = "UserMailAlreadyExists"; 10 | } 11 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/UserOperationClaims/Commands/Create/CreatedUserOperationClaimResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.UserOperationClaims.Commands.Create; 4 | 5 | public class CreatedUserOperationClaimResponse : IResponse 6 | { 7 | public Guid Id { get; set; } 8 | public Guid UserId { get; set; } 9 | public int OperationClaimId { get; set; } 10 | } 11 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/UserOperationClaims/Commands/Update/UpdatedUserOperationClaimResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.UserOperationClaims.Commands.Update; 4 | 5 | public class UpdatedUserOperationClaimResponse : IResponse 6 | { 7 | public Guid Id { get; set; } 8 | public Guid UserId { get; set; } 9 | public int OperationClaimId { get; set; } 10 | } 11 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/UserOperationClaims/Queries/GetById/GetByIdUserOperationClaimResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.UserOperationClaims.Queries.GetById; 4 | 5 | public class GetByIdUserOperationClaimResponse : IResponse 6 | { 7 | public Guid Id { get; set; } 8 | public Guid UserId { get; set; } 9 | public int OperationClaimId { get; set; } 10 | } 11 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Domain/Entities/Announcement.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Persistence.Repositories; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Domain.Entities; 9 | public class Announcement : Entity 10 | { 11 | //Duyurular 12 | public string Header { get; set; } 13 | public string Description { get; set; } 14 | } 15 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Auth/Commands/Register/InstructorRegisterDto.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Application.Features.Auth.Commands.Register; 8 | 9 | public class InstructorRegisterDto : RegisterDto 10 | { 11 | public string CompanyName { get; set; } 12 | public string Description { get; set; } 13 | } 14 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Blacklists/Commands/Create/CreatedBlacklistResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Blacklists.Commands.Create; 4 | 5 | public class CreatedBlacklistResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | public string Reason { get; set; } 9 | public DateTime Date { get; set; } 10 | public Guid ApplicantId { get; set; } 11 | } 12 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Blacklists/Commands/Update/UpdatedBlacklistResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Blacklists.Commands.Update; 4 | 5 | public class UpdatedBlacklistResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | public string Reason { get; set; } 9 | public DateTime Date { get; set; } 10 | public int ApplicantId { get; set; } 11 | } 12 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Services/Repositories/IUserOperationClaimRepository.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using NArchitecture.Core.Persistence.Repositories; 3 | 4 | namespace Application.Services.Repositories; 5 | 6 | public interface IUserOperationClaimRepository : IAsyncRepository, IRepository 7 | { 8 | Task> GetOperationClaimsByUserIdAsync(Guid userId); 9 | } 10 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/ApplicationStateInformations/Constants/ApplicationStateInformationsBusinessMessages.cs: -------------------------------------------------------------------------------- 1 | namespace Application.Features.ApplicationStateInformations.Constants; 2 | 3 | public static class ApplicationStateInformationsBusinessMessages 4 | { 5 | public const string SectionName = "ApplicationStateInformation"; 6 | 7 | public const string ApplicationStateInformationNotExists = "ApplicationStateInformationNotExists"; 8 | } 9 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Announcements/Queries/GetList/GetListAnnouncementListItemDto.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Dtos; 2 | 3 | namespace Application.Features.Announcements.Queries.GetList; 4 | 5 | public class GetListAnnouncementListItemDto : IDto 6 | { 7 | public int Id { get; set; } 8 | public string Header { get; set; } 9 | public string Description { get; set; } 10 | public DateTime CreatedDate { get; set; } 11 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Employees/Commands/Update/UpdateEmployeeCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.Employees.Commands.Update; 4 | 5 | public class UpdateEmployeeCommandValidator : AbstractValidator 6 | { 7 | public UpdateEmployeeCommandValidator() 8 | { 9 | RuleFor(c => c.Id).NotEmpty(); 10 | RuleFor(c => c.Position).NotEmpty(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Persistence/Repositories/UserRepository.cs: -------------------------------------------------------------------------------- 1 | using Application.Services.Repositories; 2 | using Domain.Entities; 3 | using NArchitecture.Core.Persistence.Repositories; 4 | using Persistence.Contexts; 5 | 6 | namespace Persistence.Repositories; 7 | 8 | public class UserRepository : EfRepositoryBase, IUserRepository 9 | { 10 | public UserRepository(BaseDbContext context) 11 | : base(context) { } 12 | } 13 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Announcements/Queries/GetById/GetByIdAnnouncementResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Announcements.Queries.GetById; 4 | 5 | public class GetByIdAnnouncementResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | public string Header { get; set; } 9 | public string Description { get; set; } 10 | public DateTime CreatedDate { get; set; } 11 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Applicants/Commands/Update/UpdateApplicantCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.Applicants.Commands.Update; 4 | 5 | public class UpdateApplicantCommandValidator : AbstractValidator 6 | { 7 | public UpdateApplicantCommandValidator() 8 | { 9 | RuleFor(c => c.Id).NotEmpty(); 10 | RuleFor(c => c.About).NotEmpty(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/OperationClaims/Commands/Create/CreateOperationClaimCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.OperationClaims.Commands.Create; 4 | 5 | public class CreateOperationClaimCommandValidator : AbstractValidator 6 | { 7 | public CreateOperationClaimCommandValidator() 8 | { 9 | RuleFor(c => c.Name).NotEmpty().MinimumLength(2); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/OperationClaims/Commands/Update/UpdateOperationClaimCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.OperationClaims.Commands.Update; 4 | 5 | public class UpdateOperationClaimCommandValidator : AbstractValidator 6 | { 7 | public UpdateOperationClaimCommandValidator() 8 | { 9 | RuleFor(c => c.Name).NotEmpty().MinimumLength(2); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/BootcampStates/Queries/GetById/GetByIdBootcampStateResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.BootcampStates.Queries.GetById; 4 | 5 | public class GetByIdBootcampStateResponse : IResponse 6 | { 7 | public short Id { get; set; } 8 | public string Name { get; set; } 9 | public DateTime CreatedDate { get; set; } 10 | public DateTime UpdatedDate { get; set; } 11 | } 12 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Comments/Commands/Create/CreatedCommentResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Comments.Commands.Create; 4 | 5 | public class CreatedCommentResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | public string Context { get; set; } 9 | public int BootcampId { get; set; } 10 | public Guid UserId { get; set; } 11 | public bool Status { get; set; } 12 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Comments/Commands/Update/UpdatedCommentResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Comments.Commands.Update; 4 | 5 | public class UpdatedCommentResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | public string Context { get; set; } 9 | public int BootcampId { get; set; } 10 | public Guid UserId { get; set; } 11 | public bool Status { get; set; } 12 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Instructors/Commands/Update/UpdateInstructorCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.Instructors.Commands.Update; 4 | 5 | public class UpdateInstructorCommandValidator : AbstractValidator 6 | { 7 | public UpdateInstructorCommandValidator() 8 | { 9 | RuleFor(c => c.Id).NotEmpty(); 10 | RuleFor(c => c.CompanyName).NotEmpty(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Persistence/Repositories/ChapterRepository.cs: -------------------------------------------------------------------------------- 1 | using Application.Services.Repositories; 2 | using Domain.Entities; 3 | using NArchitecture.Core.Persistence.Repositories; 4 | using Persistence.Contexts; 5 | 6 | namespace Persistence.Repositories; 7 | 8 | public class ChapterRepository : EfRepositoryBase, IChapterRepository 9 | { 10 | public ChapterRepository(BaseDbContext context) : base(context) 11 | { 12 | } 13 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Persistence/Repositories/CommentRepository.cs: -------------------------------------------------------------------------------- 1 | using Application.Services.Repositories; 2 | using Domain.Entities; 3 | using NArchitecture.Core.Persistence.Repositories; 4 | using Persistence.Contexts; 5 | 6 | namespace Persistence.Repositories; 7 | 8 | public class CommentRepository : EfRepositoryBase, ICommentRepository 9 | { 10 | public CommentRepository(BaseDbContext context) : base(context) 11 | { 12 | } 13 | } -------------------------------------------------------------------------------- /tests/NArchBootcampProject.Application.Tests/Mocks/FakeDatas/RefreshTokenFakeData.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using NArchitecture.Core.Test.Application.FakeData; 3 | 4 | namespace StarterProject.Application.Tests.Mocks.FakeDatas; 5 | 6 | public class RefreshTokenFakeData : BaseFakeData 7 | { 8 | public override List CreateFakeData() 9 | { 10 | return [new() { UserId = UserFakeData.Ids[0], Token = "abc" }]; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Auth/Commands/Login/LoginCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.Auth.Commands.Login; 4 | 5 | public class LoginCommandValidator : AbstractValidator 6 | { 7 | public LoginCommandValidator() 8 | { 9 | RuleFor(c => c.UserForLoginDto.Email).NotEmpty().EmailAddress(); 10 | RuleFor(c => c.UserForLoginDto.Password).NotEmpty().MinimumLength(4); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Persistence/Repositories/BootcampRepository.cs: -------------------------------------------------------------------------------- 1 | using Application.Services.Repositories; 2 | using Domain.Entities; 3 | using NArchitecture.Core.Persistence.Repositories; 4 | using Persistence.Contexts; 5 | 6 | namespace Persistence.Repositories; 7 | 8 | public class BootcampRepository : EfRepositoryBase, IBootcampRepository 9 | { 10 | public BootcampRepository(BaseDbContext context) 11 | : base(context) { } 12 | } 13 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Persistence/Repositories/EmployeeRepository.cs: -------------------------------------------------------------------------------- 1 | using Application.Services.Repositories; 2 | using Domain.Entities; 3 | using NArchitecture.Core.Persistence.Repositories; 4 | using Persistence.Contexts; 5 | 6 | namespace Persistence.Repositories; 7 | 8 | public class EmployeeRepository : EfRepositoryBase, IEmployeeRepository 9 | { 10 | public EmployeeRepository(BaseDbContext context) 11 | : base(context) { } 12 | } 13 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Announcements/Commands/Create/CreateAnnouncementCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.Announcements.Commands.Create; 4 | 5 | public class CreateAnnouncementCommandValidator : AbstractValidator 6 | { 7 | public CreateAnnouncementCommandValidator() 8 | { 9 | RuleFor(c => c.Header).NotEmpty(); 10 | RuleFor(c => c.Description).NotEmpty(); 11 | } 12 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/BootcampLogs/Queries/GetList/GetListBootcampLogListItemDto.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Dtos; 2 | 3 | namespace Application.Features.BootcampLogs.Queries.GetList; 4 | 5 | public class GetListBootcampLogListItemDto : IDto 6 | { 7 | public int Id { get; set; } 8 | public int BootcampId { get; set; } 9 | public int ChapterId { get; set; } 10 | public Guid UserId { get; set; } 11 | public bool Status { get; set; } 12 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/BootcampStates/Commands/Update/UpdateBootcampStateCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.BootcampStates.Commands.Update; 4 | 5 | public class UpdateBootcampStateCommandValidator : AbstractValidator 6 | { 7 | public UpdateBootcampStateCommandValidator() 8 | { 9 | RuleFor(c => c.Id).NotEmpty(); 10 | RuleFor(c => c.Name).NotEmpty(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/UserOperationClaims/Constants/UserOperationClaimsMessages.cs: -------------------------------------------------------------------------------- 1 | namespace Application.Features.UserOperationClaims.Constants; 2 | 3 | public static class UserOperationClaimsMessages 4 | { 5 | public const string SectionName = "UserOperationClaims"; 6 | 7 | public const string UserOperationClaimNotExists = "UserOperationClaimNotExists"; 8 | public const string UserOperationClaimAlreadyExists = "UserOperationClaimAlreadyExists"; 9 | } 10 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Persistence/Repositories/ApplicantRepository.cs: -------------------------------------------------------------------------------- 1 | using Application.Services.Repositories; 2 | using Domain.Entities; 3 | using NArchitecture.Core.Persistence.Repositories; 4 | using Persistence.Contexts; 5 | 6 | namespace Persistence.Repositories; 7 | 8 | public class ApplicantRepository : EfRepositoryBase, IApplicantRepository 9 | { 10 | public ApplicantRepository(BaseDbContext context) 11 | : base(context) { } 12 | } 13 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Persistence/Repositories/BlacklistRepository.cs: -------------------------------------------------------------------------------- 1 | using Application.Services.Repositories; 2 | using Domain.Entities; 3 | using NArchitecture.Core.Persistence.Repositories; 4 | using Persistence.Contexts; 5 | 6 | namespace Persistence.Repositories; 7 | 8 | public class BlacklistRepository : EfRepositoryBase, IBlacklistRepository 9 | { 10 | public BlacklistRepository(BaseDbContext context) 11 | : base(context) { } 12 | } 13 | -------------------------------------------------------------------------------- /tests/NArchBootcampProject.Application.Tests/Mocks/Repositories/Auth/MockOtpAuthRepository.cs: -------------------------------------------------------------------------------- 1 | using Application.Services.Repositories; 2 | using Moq; 3 | 4 | namespace StarterProject.Application.Tests.Mocks.Repositories.Auth; 5 | 6 | public static class MockOtpAuthRepository 7 | { 8 | public static IOtpAuthenticatorRepository GetOtpAuthenticatorMock() 9 | { 10 | var mockRepo = new Mock(); 11 | return mockRepo.Object; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Auth/Constants/AuthOperationClaims.cs: -------------------------------------------------------------------------------- 1 | namespace Application.Features.Auth.Constants; 2 | 3 | public static class AuthOperationClaims 4 | { 5 | private const string _section = "Auth"; 6 | 7 | public const string Admin = $"{_section}.Admin"; 8 | 9 | public const string Write = $"{_section}.Write"; 10 | public const string Read = $"{_section}.Read"; 11 | 12 | public const string RevokeToken = $"{_section}.RevokeToken"; 13 | } 14 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/BootcampLogs/Commands/Create/CreatedBootcampLogResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.BootcampLogs.Commands.Create; 4 | 5 | public class CreatedBootcampLogResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | public int BootcampId { get; set; } 9 | public int ChapterId { get; set; } 10 | public Guid UserId { get; set; } 11 | public bool Status { get; set; } 12 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/BootcampLogs/Commands/Update/UpdatedBootcampLogResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.BootcampLogs.Commands.Update; 4 | 5 | public class UpdatedBootcampLogResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | public int BootcampId { get; set; } 9 | public int ChapterId { get; set; } 10 | public Guid UserId { get; set; } 11 | public bool Status { get; set; } 12 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/BootcampLogs/Queries/GetById/GetByIdBootcampLogResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.BootcampLogs.Queries.GetById; 4 | 5 | public class GetByIdBootcampLogResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | public int BootcampId { get; set; } 9 | public int ChapterId { get; set; } 10 | public Guid UserId { get; set; } 11 | public bool Status { get; set; } 12 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Certificates/Commands/Create/CreateCertificateCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.Certificates.Commands.Create; 4 | 5 | public class CreateCertificateCommandValidator : AbstractValidator 6 | { 7 | public CreateCertificateCommandValidator() 8 | { 9 | RuleFor(c => c.UserId).NotEmpty(); 10 | //RuleFor(c => c.CreateCertificateDto).NotEmpty(); 11 | } 12 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Persistence/Repositories/InstructorRepository.cs: -------------------------------------------------------------------------------- 1 | using Application.Services.Repositories; 2 | using Domain.Entities; 3 | using NArchitecture.Core.Persistence.Repositories; 4 | using Persistence.Contexts; 5 | 6 | namespace Persistence.Repositories; 7 | 8 | public class InstructorRepository : EfRepositoryBase, IInstructorRepository 9 | { 10 | public InstructorRepository(BaseDbContext context) 11 | : base(context) { } 12 | } 13 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/ApplicationInformations/Commands/Delete/DeletedApplicationInformationCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.ApplicationInformations.Commands.Delete; 4 | 5 | public class DeleteApplicationInformationCommandValidator : AbstractValidator 6 | { 7 | public DeleteApplicationInformationCommandValidator() 8 | { 9 | RuleFor(c => c.Id).NotEmpty(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Persistence/Repositories/BootcampLogRepository.cs: -------------------------------------------------------------------------------- 1 | using Application.Services.Repositories; 2 | using Domain.Entities; 3 | using NArchitecture.Core.Persistence.Repositories; 4 | using Persistence.Contexts; 5 | 6 | namespace Persistence.Repositories; 7 | 8 | public class BootcampLogRepository : EfRepositoryBase, IBootcampLogRepository 9 | { 10 | public BootcampLogRepository(BaseDbContext context) : base(context) 11 | { 12 | } 13 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Persistence/Repositories/CertificateRepository.cs: -------------------------------------------------------------------------------- 1 | using Application.Services.Repositories; 2 | using Domain.Entities; 3 | using NArchitecture.Core.Persistence.Repositories; 4 | using Persistence.Contexts; 5 | 6 | namespace Persistence.Repositories; 7 | 8 | public class CertificateRepository : EfRepositoryBase, ICertificateRepository 9 | { 10 | public CertificateRepository(BaseDbContext context) : base(context) 11 | { 12 | } 13 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/BootcampImages/Commands/Create/CreateBootcampImageCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.BootcampImages.Commands.Create; 4 | 5 | public class CreateBootcampImageCommandValidator : AbstractValidator 6 | { 7 | public CreateBootcampImageCommandValidator() 8 | { 9 | RuleFor(c => c.BootcampId).NotEmpty(); 10 | RuleFor(c => c.ImagePath).NotEmpty(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Comments/Commands/Create/CreateCommentCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.Comments.Commands.Create; 4 | 5 | public class CreateCommentCommandValidator : AbstractValidator 6 | { 7 | public CreateCommentCommandValidator() 8 | { 9 | RuleFor(c => c.Context).NotEmpty(); 10 | RuleFor(c => c.UserId).NotEmpty(); 11 | RuleFor(c => c.Status).NotEmpty(); 12 | } 13 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Persistence/Repositories/AnnouncementRepository.cs: -------------------------------------------------------------------------------- 1 | using Application.Services.Repositories; 2 | using Domain.Entities; 3 | using NArchitecture.Core.Persistence.Repositories; 4 | using Persistence.Contexts; 5 | 6 | namespace Persistence.Repositories; 7 | 8 | public class AnnouncementRepository : EfRepositoryBase, IAnnouncementRepository 9 | { 10 | public AnnouncementRepository(BaseDbContext context) : base(context) 11 | { 12 | } 13 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/WebAPI/Controllers/Dtos/UpdateByAuthFromServiceRequestDto.cs: -------------------------------------------------------------------------------- 1 | namespace WebAPI.Controllers.Dtos; 2 | 3 | public class UpdateByAuthFromServiceRequestDto 4 | { 5 | public string IdentityNumber { get; set; } 6 | 7 | public UpdateByAuthFromServiceRequestDto() 8 | { 9 | IdentityNumber = string.Empty; 10 | } 11 | 12 | public UpdateByAuthFromServiceRequestDto(string identityNumber) 13 | { 14 | IdentityNumber = identityNumber; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Persistence/Repositories/BootcampImageRepository.cs: -------------------------------------------------------------------------------- 1 | using Application.Services.Repositories; 2 | using Domain.Entities; 3 | using NArchitecture.Core.Persistence.Repositories; 4 | using Persistence.Contexts; 5 | 6 | namespace Persistence.Repositories; 7 | 8 | public class BootcampImageRepository : EfRepositoryBase, IBootcampImageRepository 9 | { 10 | public BootcampImageRepository(BaseDbContext context) 11 | : base(context) { } 12 | } 13 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Persistence/Repositories/BootcampStateRepository.cs: -------------------------------------------------------------------------------- 1 | using Application.Services.Repositories; 2 | using Domain.Entities; 3 | using NArchitecture.Core.Persistence.Repositories; 4 | using Persistence.Contexts; 5 | 6 | namespace Persistence.Repositories; 7 | 8 | public class BootcampStateRepository : EfRepositoryBase, IBootcampStateRepository 9 | { 10 | public BootcampStateRepository(BaseDbContext context) 11 | : base(context) { } 12 | } 13 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Domain/Entities/Employee.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using NArchitecture.Core.Persistence.Repositories; 7 | 8 | namespace Domain.Entities; 9 | 10 | public class Employee : User 11 | { 12 | public string Position { get; set; } 13 | 14 | public Employee() { } 15 | 16 | public Employee(string position) 17 | { 18 | Position = position; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Persistence/Repositories/OperationClaimRepository.cs: -------------------------------------------------------------------------------- 1 | using Application.Services.Repositories; 2 | using Domain.Entities; 3 | using NArchitecture.Core.Persistence.Repositories; 4 | using Persistence.Contexts; 5 | 6 | namespace Persistence.Repositories; 7 | 8 | public class OperationClaimRepository : EfRepositoryBase, IOperationClaimRepository 9 | { 10 | public OperationClaimRepository(BaseDbContext context) 11 | : base(context) { } 12 | } 13 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/ApplicationInformations/Constants/ApplicationInformationsBusinessMessages.cs: -------------------------------------------------------------------------------- 1 | namespace Application.Features.ApplicationInformations.Constants; 2 | 3 | public static class ApplicationInformationsBusinessMessages 4 | { 5 | public const string SectionName = "ApplicationInformation"; 6 | 7 | public const string ApplicationInformationNotExists = "ApplicationInformationNotExists"; 8 | public const string ApplicantIsBlacklisted = "Applicant is Blacklisted!"; 9 | } 10 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Blacklists/Commands/Create/CreateBlacklistCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.Blacklists.Commands.Create; 4 | 5 | public class CreateBlacklistCommandValidator : AbstractValidator 6 | { 7 | public CreateBlacklistCommandValidator() 8 | { 9 | RuleFor(c => c.Reason).NotEmpty(); 10 | RuleFor(c => c.Date).NotEmpty(); 11 | RuleFor(c => c.ApplicantId).NotEmpty(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Persistence/Repositories/OtpAuthenticatorRepository.cs: -------------------------------------------------------------------------------- 1 | using Application.Services.Repositories; 2 | using Domain.Entities; 3 | using NArchitecture.Core.Persistence.Repositories; 4 | using Persistence.Contexts; 5 | 6 | namespace Persistence.Repositories; 7 | 8 | public class OtpAuthenticatorRepository : EfRepositoryBase, IOtpAuthenticatorRepository 9 | { 10 | public OtpAuthenticatorRepository(BaseDbContext context) 11 | : base(context) { } 12 | } 13 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/ApplicationStateInformations/Commands/Create/CreateApplicationStateInformationCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.ApplicationStateInformations.Commands.Create; 4 | 5 | public class CreateApplicationStateInformationCommandValidator : AbstractValidator 6 | { 7 | public CreateApplicationStateInformationCommandValidator() 8 | { 9 | RuleFor(c => c.Name).NotEmpty(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/ApplicationStateInformations/Commands/Delete/DeletedApplicationStateInformationCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.ApplicationStateInformations.Commands.Delete; 4 | 5 | public class DeleteApplicationStateInformationCommandValidator : AbstractValidator 6 | { 7 | public DeleteApplicationStateInformationCommandValidator() 8 | { 9 | RuleFor(c => c.Id).NotEmpty(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Certificates/Commands/Update/UpdateCertificateCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.Certificates.Commands.Update; 4 | 5 | public class UpdateCertificateCommandValidator : AbstractValidator 6 | { 7 | public UpdateCertificateCommandValidator() 8 | { 9 | RuleFor(c => c.Id).NotEmpty(); 10 | RuleFor(c => c.ApplicantId).NotEmpty(); 11 | RuleFor(c => c.BootcampId).NotEmpty(); 12 | } 13 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Domain/Entities/Applicant.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Persistence.Repositories; 2 | 3 | namespace Domain.Entities; 4 | 5 | public class Applicant : User 6 | { 7 | public string About { get; set; } 8 | 9 | //public virtual Blacklist? Blacklist { get; set; } 10 | public virtual ICollection ApplicationInformations { get; set; } 11 | 12 | public Applicant() { } 13 | 14 | public Applicant(string about) 15 | { 16 | About = about; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /tests/NArchBootcampProject.Application.Tests/Mocks/Repositories/Auth/MockEmailAuthenticatorRepository.cs: -------------------------------------------------------------------------------- 1 | using Application.Services.Repositories; 2 | using Moq; 3 | 4 | namespace StarterProject.Application.Tests.Mocks.Repositories.Auth; 5 | 6 | public static class MockEmailAuthenticatorRepository 7 | { 8 | public static IEmailAuthenticatorRepository GetEmailAuthenticatorRepositoryMock() 9 | { 10 | var mockRepo = new Mock(); 11 | return mockRepo.Object; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Announcements/Commands/Update/UpdateAnnouncementCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.Announcements.Commands.Update; 4 | 5 | public class UpdateAnnouncementCommandValidator : AbstractValidator 6 | { 7 | public UpdateAnnouncementCommandValidator() 8 | { 9 | RuleFor(c => c.Id).NotEmpty(); 10 | RuleFor(c => c.Header).NotEmpty(); 11 | RuleFor(c => c.Description).NotEmpty(); 12 | } 13 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Auth/Profiles/MappingProfiles.cs: -------------------------------------------------------------------------------- 1 | using Application.Features.Auth.Commands.RevokeToken; 2 | using AutoMapper; 3 | using Domain.Entities; 4 | 5 | namespace Application.Features.Auth.Profiles; 6 | 7 | public class MappingProfiles : Profile 8 | { 9 | public MappingProfiles() 10 | { 11 | CreateMap, RefreshToken>().ReverseMap(); 12 | CreateMap().ReverseMap(); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/ApplicationStateInformations/Queries/GetById/GetByIdApplicationStateInformationResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.ApplicationStateInformations.Queries.GetById; 4 | 5 | public class GetByIdApplicationStateInformationResponse : IResponse 6 | { 7 | public short Id { get; set; } 8 | public string Name { get; set; } 9 | public DateTime CreatedDate { get; set; } 10 | public DateTime UpdatedDate { get; set; } 11 | } 12 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/UserOperationClaims/Commands/Create/CreateUserOperationClaimCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.UserOperationClaims.Commands.Create; 4 | 5 | public class CreateUserOperationClaimCommandValidator : AbstractValidator 6 | { 7 | public CreateUserOperationClaimCommandValidator() 8 | { 9 | RuleFor(c => c.UserId).NotNull(); 10 | RuleFor(c => c.OperationClaimId).GreaterThan(0); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/UserOperationClaims/Commands/Update/UpdateUserOperationClaimCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.UserOperationClaims.Commands.Update; 4 | 5 | public class UpdateUserOperationClaimCommandValidator : AbstractValidator 6 | { 7 | public UpdateUserOperationClaimCommandValidator() 8 | { 9 | RuleFor(c => c.UserId).NotNull(); 10 | RuleFor(c => c.OperationClaimId).GreaterThan(0); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /NArchBootcampProject.sln.DotSettings: -------------------------------------------------------------------------------- 1 | 2 | False 3 | False -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/BootcampImages/Commands/Update/UpdateBootcampImageCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.BootcampImages.Commands.Update; 4 | 5 | public class UpdateBootcampImageCommandValidator : AbstractValidator 6 | { 7 | public UpdateBootcampImageCommandValidator() 8 | { 9 | RuleFor(c => c.Id).NotEmpty(); 10 | RuleFor(c => c.BootcampId).NotEmpty(); 11 | RuleFor(c => c.ImagePath).NotEmpty(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Persistence/Repositories/EmailAuthenticatorRepository.cs: -------------------------------------------------------------------------------- 1 | using Application.Services.Repositories; 2 | using Domain.Entities; 3 | using NArchitecture.Core.Persistence.Repositories; 4 | using Persistence.Contexts; 5 | 6 | namespace Persistence.Repositories; 7 | 8 | public class EmailAuthenticatorRepository 9 | : EfRepositoryBase, 10 | IEmailAuthenticatorRepository 11 | { 12 | public EmailAuthenticatorRepository(BaseDbContext context) 13 | : base(context) { } 14 | } 15 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Chapters/Commands/Create/CreatedChapterResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Chapters.Commands.Create; 4 | 5 | public class CreatedChapterResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | public int Sort { get; set; } 9 | public string Title { get; set; } 10 | public string? Description { get; set; } 11 | public string Link { get; set; } 12 | public int BootcampId { get; set; } 13 | public int Time { get; set; } 14 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Chapters/Commands/Update/UpdatedChapterResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Chapters.Commands.Update; 4 | 5 | public class UpdatedChapterResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | public int Sort { get; set; } 9 | public string Title { get; set; } 10 | public string? Description { get; set; } 11 | public string Link { get; set; } 12 | public int BootcampId { get; set; } 13 | public int Time { get; set; } 14 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Blacklists/Commands/Update/UpdateBlacklistCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.Blacklists.Commands.Update; 4 | 5 | public class UpdateBlacklistCommandValidator : AbstractValidator 6 | { 7 | public UpdateBlacklistCommandValidator() 8 | { 9 | RuleFor(c => c.Id).NotEmpty(); 10 | RuleFor(c => c.Reason).NotEmpty(); 11 | RuleFor(c => c.Date).NotEmpty(); 12 | RuleFor(c => c.ApplicantId).NotEmpty(); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Infrastructure/InfrastructureServiceRegistration.cs: -------------------------------------------------------------------------------- 1 | using Application.Services.ImageService; 2 | using Infrastructure.Adapters.ImageService; 3 | using Microsoft.Extensions.DependencyInjection; 4 | 5 | namespace Infrastructure; 6 | 7 | public static class InfrastructureServiceRegistration 8 | { 9 | public static IServiceCollection AddInfrastructureServices(this IServiceCollection services) 10 | { 11 | services.AddScoped(); 12 | 13 | return services; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/WebAPI/WebAPIConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace WebAPI; 2 | 3 | public class WebApiConfiguration 4 | { 5 | public string ApiDomain { get; set; } 6 | public string[] AllowedOrigins { get; set; } 7 | 8 | public WebApiConfiguration() 9 | { 10 | ApiDomain = string.Empty; 11 | AllowedOrigins = Array.Empty(); 12 | } 13 | 14 | public WebApiConfiguration(string apiDomain, string[] allowedOrigins) 15 | { 16 | ApiDomain = apiDomain; 17 | AllowedOrigins = allowedOrigins; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/ApplicationStateInformations/Commands/Update/UpdateApplicationStateInformationCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.ApplicationStateInformations.Commands.Update; 4 | 5 | public class UpdateApplicationStateInformationCommandValidator : AbstractValidator 6 | { 7 | public UpdateApplicationStateInformationCommandValidator() 8 | { 9 | RuleFor(c => c.Id).NotEmpty(); 10 | RuleFor(c => c.Name).NotEmpty(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Persistence/Repositories/ApplicationInformationRepository.cs: -------------------------------------------------------------------------------- 1 | using Application.Services.Repositories; 2 | using Domain.Entities; 3 | using NArchitecture.Core.Persistence.Repositories; 4 | using Persistence.Contexts; 5 | 6 | namespace Persistence.Repositories; 7 | 8 | public class ApplicationInformationRepository 9 | : EfRepositoryBase, 10 | IApplicationInformationRepository 11 | { 12 | public ApplicationInformationRepository(BaseDbContext context) 13 | : base(context) { } 14 | } 15 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/BootcampLogs/Commands/Create/CreateBootcampLogCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.BootcampLogs.Commands.Create; 4 | 5 | public class CreateBootcampLogCommandValidator : AbstractValidator 6 | { 7 | public CreateBootcampLogCommandValidator() 8 | { 9 | RuleFor(c => c.BootcampId).NotEmpty(); 10 | RuleFor(c => c.ChapterId).NotEmpty(); 11 | RuleFor(c => c.UserId).NotEmpty(); 12 | RuleFor(c => c.Status).NotEmpty(); 13 | } 14 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Auth/Commands/RevokeToken/RevokedTokenResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Auth.Commands.RevokeToken; 4 | 5 | public class RevokedTokenResponse : IResponse 6 | { 7 | public Guid Id { get; set; } 8 | public string Token { get; set; } 9 | 10 | public RevokedTokenResponse() 11 | { 12 | Token = string.Empty; 13 | } 14 | 15 | public RevokedTokenResponse(Guid id, string token) 16 | { 17 | Id = id; 18 | Token = token; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Services/AuthenticatorService/IAuthenticatorService.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | 3 | namespace Application.Services.AuthenticatorService; 4 | 5 | public interface IAuthenticatorService 6 | { 7 | public Task CreateEmailAuthenticator(User user); 8 | public Task CreateOtpAuthenticator(User user); 9 | public Task ConvertSecretKeyToString(byte[] secretKey); 10 | public Task SendAuthenticatorCode(User user); 11 | public Task VerifyAuthenticatorCode(User user, string authenticatorCode); 12 | } 13 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Comments/Commands/Update/UpdateCommentCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.Comments.Commands.Update; 4 | 5 | public class UpdateCommentCommandValidator : AbstractValidator 6 | { 7 | public UpdateCommentCommandValidator() 8 | { 9 | //RuleFor(c => c.Id).NotEmpty(); 10 | //RuleFor(c => c.Context).NotEmpty(); 11 | //RuleFor(c => c.ChapterId).NotEmpty(); 12 | //RuleFor(c => c.UserId).NotEmpty(); 13 | RuleFor(c => c.Status).NotEmpty(); 14 | } 15 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Employees/Commands/Create/CreatedEmployeeResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Employees.Commands.Create; 4 | 5 | public class CreatedEmployeeResponse : IResponse 6 | { 7 | public Guid Id { get; set; } 8 | public string UserName { get; set; } 9 | public string FirstName { get; set; } 10 | public string LastName { get; set; } 11 | public DateTime DateOfBirth { get; set; } 12 | public string NationalIdentity { get; set; } 13 | public string Position { get; set; } 14 | } 15 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Employees/Commands/Delete/DeletedEmployeeResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Employees.Commands.Delete; 4 | 5 | public class DeletedEmployeeResponse : IResponse 6 | { 7 | public Guid Id { get; set; } 8 | public string UserName { get; set; } 9 | public string FirstName { get; set; } 10 | public string LastName { get; set; } 11 | public DateTime DateOfBirth { get; set; } 12 | public string NationalIdentity { get; set; } 13 | public string Position { get; set; } 14 | } 15 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Employees/Commands/Update/UpdatedEmployeeResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Employees.Commands.Update; 4 | 5 | public class UpdatedEmployeeResponse : IResponse 6 | { 7 | public Guid Id { get; set; } 8 | public string UserName { get; set; } 9 | public string FirstName { get; set; } 10 | public string LastName { get; set; } 11 | public DateTime DateOfBirth { get; set; } 12 | public string NationalIdentity { get; set; } 13 | public string Position { get; set; } 14 | } 15 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Persistence/Repositories/ApplicationStateInformationRepository.cs: -------------------------------------------------------------------------------- 1 | using Application.Services.Repositories; 2 | using Domain.Entities; 3 | using NArchitecture.Core.Persistence.Repositories; 4 | using Persistence.Contexts; 5 | 6 | namespace Persistence.Repositories; 7 | 8 | public class ApplicationStateInformationRepository 9 | : EfRepositoryBase, 10 | IApplicationStateInformationRepository 11 | { 12 | public ApplicationStateInformationRepository(BaseDbContext context) 13 | : base(context) { } 14 | } 15 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Applicants/Commands/Create/CreatedApplicantResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Applicants.Commands.Create; 4 | 5 | public class CreatedApplicantResponse : IResponse 6 | { 7 | public Guid Id { get; set; } 8 | public string UserName { get; set; } 9 | public string FirstName { get; set; } 10 | public string LastName { get; set; } 11 | public DateTime DateOfBirth { get; set; } 12 | public string NationalIdentity { get; set; } 13 | public string About { get; set; } 14 | } 15 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Applicants/Commands/Delete/DeletedApplicantResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Applicants.Commands.Delete; 4 | 5 | public class DeletedApplicantResponse : IResponse 6 | { 7 | public Guid Id { get; set; } 8 | public string UserName { get; set; } 9 | public string FirstName { get; set; } 10 | public string LastName { get; set; } 11 | public DateTime DateOfBirth { get; set; } 12 | public string NationalIdentity { get; set; } 13 | public string About { get; set; } 14 | } 15 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Applicants/Commands/Update/UpdatedApplicantResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Applicants.Commands.Update; 4 | 5 | public class UpdatedApplicantResponse : IResponse 6 | { 7 | public Guid Id { get; set; } 8 | public string UserName { get; set; } 9 | public string FirstName { get; set; } 10 | public string LastName { get; set; } 11 | public DateTime DateOfBirth { get; set; } 12 | public string NationalIdentity { get; set; } 13 | public string About { get; set; } 14 | } 15 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Auth/Commands/EnableOtpAuthenticator/EnabledOtpAuthenticatorResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Auth.Commands.EnableOtpAuthenticator; 4 | 5 | public class EnabledOtpAuthenticatorResponse : IResponse 6 | { 7 | public string SecretKey { get; set; } 8 | 9 | public EnabledOtpAuthenticatorResponse() 10 | { 11 | SecretKey = string.Empty; 12 | } 13 | 14 | public EnabledOtpAuthenticatorResponse(string secretKey) 15 | { 16 | SecretKey = secretKey; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Users/Commands/Create/CreateUserCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.Users.Commands.Create; 4 | 5 | public class CreateUserCommandValidator : AbstractValidator 6 | { 7 | public CreateUserCommandValidator() 8 | { 9 | RuleFor(c => c.FirstName).NotEmpty().MinimumLength(2); 10 | RuleFor(c => c.LastName).NotEmpty().MinimumLength(2); 11 | RuleFor(c => c.Email).NotEmpty().EmailAddress(); 12 | RuleFor(c => c.Password).NotEmpty().MinimumLength(4); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Users/Commands/Update/UpdateUserCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.Users.Commands.Update; 4 | 5 | public class UpdateUserCommandValidator : AbstractValidator 6 | { 7 | public UpdateUserCommandValidator() 8 | { 9 | RuleFor(c => c.FirstName).NotEmpty().MinimumLength(2); 10 | RuleFor(c => c.LastName).NotEmpty().MinimumLength(2); 11 | RuleFor(c => c.Email).NotEmpty().EmailAddress(); 12 | RuleFor(c => c.Password).NotEmpty().MinimumLength(4); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Users/Constants/UsersOperationClaims.cs: -------------------------------------------------------------------------------- 1 | namespace Application.Features.Users.Constants; 2 | 3 | public static class UsersOperationClaims 4 | { 5 | private const string _section = "Users"; 6 | 7 | public const string Admin = $"{_section}.Admin"; 8 | 9 | public const string Read = $"{_section}.Read"; 10 | public const string Write = $"{_section}.Write"; 11 | 12 | public const string Create = $"{_section}.Create"; 13 | public const string Update = $"{_section}.Update"; 14 | public const string Delete = $"{_section}.Delete"; 15 | } 16 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Domain/Entities/BootcampLog.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Persistence.Repositories; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Domain.Entities; 9 | public class BootcampLog:Entity 10 | { 11 | public int BootcampId { get; set; } 12 | public int ChapterId { get; set; } 13 | public Guid UserId { get; set; } 14 | public bool Status { get; set; } 15 | public virtual Bootcamp Bootcamp { get; set; } 16 | public virtual User User { get; set; } 17 | } 18 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Domain/Entities/BootcampImage.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Persistence.Repositories; 2 | 3 | namespace Domain.Entities; 4 | 5 | public class BootcampImage : Entity 6 | { 7 | public int BootcampId { get; set; } 8 | public string ImagePath { get; set; } 9 | public virtual Bootcamp? Bootcamp { get; set; } 10 | 11 | public BootcampImage() { } 12 | 13 | public BootcampImage(int bootcampId, string imagePath, Bootcamp? bootcamp) 14 | { 15 | BootcampId = bootcampId; 16 | ImagePath = imagePath; 17 | Bootcamp = bootcamp; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Instructors/Commands/Delete/DeletedInstructorResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Instructors.Commands.Delete; 4 | 5 | public class DeletedInstructorResponse : IResponse 6 | { 7 | public Guid Id { get; set; } 8 | public string UserName { get; set; } 9 | public string FirstName { get; set; } 10 | public string LastName { get; set; } 11 | public DateTime DateOfBirth { get; set; } 12 | public string NationalIdentity { get; set; } 13 | public string CompanyName { get; set; } 14 | } 15 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Comments/Queries/GetList/GetListCommentListItemDto.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Dtos; 2 | 3 | namespace Application.Features.Comments.Queries.GetList; 4 | 5 | public class GetListCommentListItemDto : IDto 6 | { 7 | public int Id { get; set; } 8 | public string Context { get; set; } 9 | public int BootcampId { get; set; } 10 | public string BootcampName { get; set; } 11 | public Guid UserId { get; set; } 12 | public string UserFirstName { get; set; } 13 | public string UserLastName { get; set; } 14 | public bool Status { get; set; } 15 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/ApplicationInformations/Commands/Create/CreateApplicationInformationCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.ApplicationInformations.Commands.Create; 4 | 5 | public class CreateApplicationInformationCommandValidator : AbstractValidator 6 | { 7 | public CreateApplicationInformationCommandValidator() 8 | { 9 | RuleFor(c => c.ApplicantId).NotEmpty(); 10 | RuleFor(c => c.BootcampId).NotEmpty(); 11 | RuleFor(c => c.ApplicationStateInformationId).NotEmpty(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /.config/dotnet-tools.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "isRoot": true, 4 | "tools": { 5 | "dotnet-ef": { 6 | "version": "8.0.0", 7 | "commands": [ 8 | "dotnet-ef" 9 | ] 10 | }, 11 | "csharpier": { 12 | "version": "0.27.2", 13 | "commands": [ 14 | "dotnet-csharpier" 15 | ] 16 | }, 17 | "roslynator.dotnet.cli": { 18 | "version": "0.5.0", 19 | "commands": [ 20 | "roslynator" 21 | ] 22 | }, 23 | "narchitecture.gen": { 24 | "version": "1.1.0", 25 | "commands": [ 26 | "nArchGen" 27 | ] 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/OperationClaims/Commands/Create/CreatedOperationClaimResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.OperationClaims.Commands.Create; 4 | 5 | public class CreatedOperationClaimResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | public string Name { get; set; } 9 | 10 | public CreatedOperationClaimResponse() 11 | { 12 | Name = string.Empty; 13 | } 14 | 15 | public CreatedOperationClaimResponse(int id, string name) 16 | { 17 | Id = id; 18 | Name = name; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/OperationClaims/Commands/Update/UpdatedOperationClaimResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.OperationClaims.Commands.Update; 4 | 5 | public class UpdatedOperationClaimResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | public string Name { get; set; } 9 | 10 | public UpdatedOperationClaimResponse() 11 | { 12 | Name = string.Empty; 13 | } 14 | 15 | public UpdatedOperationClaimResponse(int id, string name) 16 | { 17 | Id = id; 18 | Name = name; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/OperationClaims/Queries/GetById/GetByIdOperationClaimResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.OperationClaims.Queries.GetById; 4 | 5 | public class GetByIdOperationClaimResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | public string Name { get; set; } 9 | 10 | public GetByIdOperationClaimResponse() 11 | { 12 | Name = string.Empty; 13 | } 14 | 15 | public GetByIdOperationClaimResponse(int id, string name) 16 | { 17 | Id = id; 18 | Name = name; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/OperationClaims/Queries/GetList/GetListOperationClaimListItemDto.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Dtos; 2 | 3 | namespace Application.Features.OperationClaims.Queries.GetList; 4 | 5 | public class GetListOperationClaimListItemDto : IDto 6 | { 7 | public int Id { get; set; } 8 | public string Name { get; set; } 9 | 10 | public GetListOperationClaimListItemDto() 11 | { 12 | Name = string.Empty; 13 | } 14 | 15 | public GetListOperationClaimListItemDto(int id, string name) 16 | { 17 | Id = id; 18 | Name = name; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Certificates/Constants/CertificatesOperationClaims.cs: -------------------------------------------------------------------------------- 1 | namespace Application.Features.Certificates.Constants; 2 | 3 | public static class CertificatesOperationClaims 4 | { 5 | private const string _section = "Certificates"; 6 | 7 | public const string Admin = $"{_section}.Admin"; 8 | 9 | public const string Read = $"{_section}.Read"; 10 | public const string Write = $"{_section}.Write"; 11 | 12 | public const string Create = $"{_section}.Create"; 13 | public const string Update = $"{_section}.Update"; 14 | public const string Delete = $"{_section}.Delete"; 15 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Announcements/Constants/AnnouncementsOperationClaims.cs: -------------------------------------------------------------------------------- 1 | namespace Application.Features.Announcements.Constants; 2 | 3 | public static class AnnouncementsOperationClaims 4 | { 5 | private const string _section = "Announcements"; 6 | 7 | public const string Admin = $"{_section}.Admin"; 8 | 9 | public const string Read = $"{_section}.Read"; 10 | public const string Write = $"{_section}.Write"; 11 | 12 | public const string Create = $"{_section}.Create"; 13 | public const string Update = $"{_section}.Update"; 14 | public const string Delete = $"{_section}.Delete"; 15 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Chapters/Commands/Create/CreateChapterCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.Chapters.Commands.Create; 4 | 5 | public class CreateChapterCommandValidator : AbstractValidator 6 | { 7 | public CreateChapterCommandValidator() 8 | { 9 | RuleFor(c => c.Sort).NotEmpty(); 10 | RuleFor(c => c.Title).NotEmpty(); 11 | RuleFor(c => c.Description).NotEmpty(); 12 | RuleFor(c => c.Link).NotEmpty(); 13 | RuleFor(c => c.BootcampId).NotEmpty(); 14 | RuleFor(c => c.Time).NotEmpty(); 15 | } 16 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Domain/Entities/Instructor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using NArchitecture.Core.Persistence.Repositories; 7 | 8 | namespace Domain.Entities; 9 | 10 | public class Instructor : User 11 | { 12 | public string CompanyName { get; set; } 13 | public string Description { get; set; } 14 | 15 | //public virtual Bootcamp? Bootcamps { get; set; } 16 | 17 | public Instructor() { } 18 | 19 | public Instructor(string companyName) 20 | { 21 | CompanyName = companyName; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Auth/Commands/Register/RegisterDto.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Application.Features.Auth.Commands.Register; 8 | 9 | public class RegisterDto 10 | { 11 | public string FirstName { get; set; } 12 | public string LastName { get; set; } 13 | public string Email { get; set; } 14 | public string UserName { get; set; } 15 | public string Password { get; set; } 16 | public DateTime DateOfBirth { get; set; } 17 | public string NationalIdentity { get; set; } 18 | } 19 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Chapters/Queries/GetList/GetListChapterListItemDto.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Dtos; 2 | 3 | namespace Application.Features.Chapters.Queries.GetList; 4 | 5 | public class GetListChapterListItemDto : IDto 6 | { 7 | public int Id { get; set; } 8 | public int Sort { get; set; } 9 | public string Title { get; set; } 10 | public string? Description { get; set; } 11 | public string Link { get; set; } 12 | public int BootcampId { get; set; } 13 | public string BootcampName { get; set; } 14 | public int Time { get; set; } 15 | public DateTime CreatedDate { get; set; } 16 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/OperationClaims/Constants/OperationClaimsOperationClaims.cs: -------------------------------------------------------------------------------- 1 | namespace Application.Features.OperationClaims.Constants; 2 | 3 | public static class OperationClaimsOperationClaims 4 | { 5 | private const string _section = "OperationClaims"; 6 | 7 | public const string Admin = $"{_section}.Admin"; 8 | 9 | public const string Read = $"{_section}.Read"; 10 | public const string Write = $"{_section}.Write"; 11 | 12 | public const string Create = $"{_section}.Create"; 13 | public const string Update = $"{_section}.Update"; 14 | public const string Delete = $"{_section}.Delete"; 15 | } 16 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Blacklists/Queries/GetList/GetListBlacklistListItemDto.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Dtos; 2 | 3 | namespace Application.Features.Blacklists.Queries.GetList; 4 | 5 | public class GetListBlacklistListItemDto : IDto 6 | { 7 | public int Id { get; set; } 8 | public string Reason { get; set; } 9 | public DateTime Date { get; set; } 10 | public Guid ApplicantId { get; set; } 11 | public string ApplicantFirstName { get; set; } 12 | public string ApplicantLastName { get; set; } 13 | public string ApplicantEmail { get; set; } 14 | public DateTime CreatedDate { get; set; } 15 | } 16 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Chapters/Queries/GetById/GetByIdChapterResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Chapters.Queries.GetById; 4 | 5 | public class GetByIdChapterResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | public int Sort { get; set; } 9 | public string Title { get; set; } 10 | public string? Description { get; set; } 11 | public string Link { get; set; } 12 | public int BootcampId { get; set; } 13 | public string BootcampName { get; set; } 14 | public int Time { get; set; } 15 | public DateTime CreatedDate { get; set; } 16 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Instructors/Commands/Create/CreatedInstructorResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Instructors.Commands.Create; 4 | 5 | public class CreatedInstructorResponse : IResponse 6 | { 7 | public Guid Id { get; set; } 8 | public string UserName { get; set; } 9 | public string FirstName { get; set; } 10 | public string LastName { get; set; } 11 | public string Description { get; set; } 12 | public DateTime DateOfBirth { get; set; } 13 | public string NationalIdentity { get; set; } 14 | public string CompanyName { get; set; } 15 | } 16 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Instructors/Commands/Update/UpdatedInstructorResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Instructors.Commands.Update; 4 | 5 | public class UpdatedInstructorResponse : IResponse 6 | { 7 | public Guid Id { get; set; } 8 | public string UserName { get; set; } 9 | public string FirstName { get; set; } 10 | public string LastName { get; set; } 11 | public string Description { get; set; } 12 | public DateTime DateOfBirth { get; set; } 13 | public string NationalIdentity { get; set; } 14 | public string CompanyName { get; set; } 15 | } 16 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/ApplicationInformations/Commands/Update/UpdateApplicationInformationCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.ApplicationInformations.Commands.Update; 4 | 5 | public class UpdateApplicationInformationCommandValidator : AbstractValidator 6 | { 7 | public UpdateApplicationInformationCommandValidator() 8 | { 9 | RuleFor(c => c.Id).NotEmpty(); 10 | //RuleFor(c => c.ApplicantId).NotEmpty(); 11 | //RuleFor(c => c.BootcampId).NotEmpty(); 12 | RuleFor(c => c.ApplicationStateInformationId).NotEmpty(); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Bootcamps/Commands/Create/CreateBootcampCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.Bootcamps.Commands.Create; 4 | 5 | public class CreateBootcampCommandValidator : AbstractValidator 6 | { 7 | public CreateBootcampCommandValidator() 8 | { 9 | RuleFor(c => c.Name).NotEmpty(); 10 | RuleFor(c => c.InstructorId).NotEmpty(); 11 | RuleFor(c => c.StartDate).NotEmpty(); 12 | RuleFor(c => c.EndDate).NotEmpty(); 13 | RuleFor(c => c.BootcampStateId).NotEmpty(); 14 | RuleFor(c => c.Description).NotEmpty(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/UserOperationClaims/Constants/UserOperationClaimsOperationClaims.cs: -------------------------------------------------------------------------------- 1 | namespace Application.Features.UserOperationClaims.Constants; 2 | 3 | public static class UserOperationClaimsOperationClaims 4 | { 5 | private const string _section = "UserOperationClaims"; 6 | 7 | public const string Admin = $"{_section}.Admin"; 8 | 9 | public const string Read = $"{_section}.Read"; 10 | public const string Write = $"{_section}.Write"; 11 | 12 | public const string Create = $"{_section}.Create"; 13 | public const string Update = $"{_section}.Update"; 14 | public const string Delete = $"{_section}.Delete"; 15 | } 16 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Domain/Entities/Blacklist.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Persistence.Repositories; 2 | 3 | namespace Domain.Entities; 4 | 5 | public class Blacklist : Entity 6 | { 7 | public string Reason { get; set; } 8 | public DateTime Date { get; set; } 9 | public Guid ApplicantId { get; set; } 10 | 11 | public virtual Applicant? Applicant { get; set; } 12 | 13 | public Blacklist() { } 14 | 15 | public Blacklist(string reason, DateTime date, Guid applicantId, Applicant applicant) 16 | { 17 | Reason = reason; 18 | Date = date; 19 | ApplicantId = applicantId; 20 | Applicant = applicant; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/NArchBootcampProject.Application.Tests/Mocks/Repositories/UserMockRepository.cs: -------------------------------------------------------------------------------- 1 | using Application.Features.Users.Profiles; 2 | using Application.Features.Users.Rules; 3 | using Application.Services.Repositories; 4 | using Domain.Entities; 5 | using NArchitecture.Core.Test.Application.Repositories; 6 | using StarterProject.Application.Tests.Mocks.FakeDatas; 7 | 8 | namespace StarterProject.Application.Tests.Mocks.Repositories; 9 | 10 | public class UserMockRepository 11 | : BaseMockRepository 12 | { 13 | public UserMockRepository(UserFakeData fakeData) 14 | : base(fakeData) { } 15 | } 16 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/ApplicationInformations/Commands/Create/CreatedApplicationInformationResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.ApplicationInformations.Commands.Create; 4 | 5 | public class CreatedApplicationInformationResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | public Guid ApplicantId { get; set; } 9 | public string ApplicantFirstName { get; set; } 10 | public string ApplicantLastName { get; set; } 11 | public int BootcampId { get; set; } 12 | public string BootcampName { get; set; } 13 | public string ApplicationStateInformationName { get; set; } 14 | } 15 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/ApplicationInformations/Commands/Update/UpdatedApplicationInformationResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.ApplicationInformations.Commands.Update; 4 | 5 | public class UpdatedApplicationInformationResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | public Guid ApplicantId { get; set; } 9 | public string ApplicantFirstName { get; set; } 10 | public string ApplicantLastName { get; set; } 11 | public int BootcampId { get; set; } 12 | public string BootcampName { get; set; } 13 | public string ApplicationStateInformationName { get; set; } 14 | } 15 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Chapters/Commands/Update/UpdateChapterCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.Chapters.Commands.Update; 4 | 5 | public class UpdateChapterCommandValidator : AbstractValidator 6 | { 7 | public UpdateChapterCommandValidator() 8 | { 9 | RuleFor(c => c.Id).NotEmpty(); 10 | RuleFor(c => c.Sort).NotEmpty(); 11 | RuleFor(c => c.Title).NotEmpty(); 12 | RuleFor(c => c.Description).NotEmpty(); 13 | RuleFor(c => c.Link).NotEmpty(); 14 | RuleFor(c => c.BootcampId).NotEmpty(); 15 | RuleFor(c => c.Time).NotEmpty(); 16 | } 17 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Employees/Queries/GetList/GetListEmployeeListItemDto.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Dtos; 2 | 3 | namespace Application.Features.Employees.Queries.GetList; 4 | 5 | public class GetListEmployeeListItemDto : IDto 6 | { 7 | public Guid Id { get; set; } 8 | public string UserName { get; set; } 9 | public string FirstName { get; set; } 10 | public string LastName { get; set; } 11 | public DateTime DateOfBirth { get; set; } 12 | public string NationalIdentity { get; set; } 13 | public string Position { get; set; } 14 | public string Email { get; set; } 15 | public DateTime CreatedDate { get; set; } 16 | } 17 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Applicants/Queries/GetList/GetListApplicantListItemDto.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Dtos; 2 | 3 | namespace Application.Features.Applicants.Queries.GetList; 4 | 5 | public class GetListApplicantListItemDto : IDto 6 | { 7 | public Guid Id { get; set; } 8 | public string UserName { get; set; } 9 | public string FirstName { get; set; } 10 | public string LastName { get; set; } 11 | public string Email { get; set; } 12 | public DateTime DateOfBirth { get; set; } 13 | public string NationalIdentity { get; set; } 14 | public string About { get; set; } 15 | public DateTime CreatedDate { get; set; } 16 | } 17 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Chapters/Constants/ChaptersOperationClaims.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Security.Attributes; 2 | 3 | namespace Application.Features.Chapters.Constants; 4 | 5 | [OperationClaimConstants] 6 | public static class ChaptersOperationClaims 7 | { 8 | private const string _section = "Chapters"; 9 | 10 | public const string Admin = $"{_section}.Admin"; 11 | 12 | public const string Read = $"{_section}.Read"; 13 | public const string Write = $"{_section}.Write"; 14 | 15 | public const string Create = $"{_section}.Create"; 16 | public const string Update = $"{_section}.Update"; 17 | public const string Delete = $"{_section}.Delete"; 18 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Comments/Constants/CommentsOperationClaims.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Security.Attributes; 2 | 3 | namespace Application.Features.Comments.Constants; 4 | 5 | [OperationClaimConstants] 6 | public static class CommentsOperationClaims 7 | { 8 | private const string _section = "Comments"; 9 | 10 | public const string Admin = $"{_section}.Admin"; 11 | 12 | public const string Read = $"{_section}.Read"; 13 | public const string Write = $"{_section}.Write"; 14 | 15 | public const string Create = $"{_section}.Create"; 16 | public const string Update = $"{_section}.Update"; 17 | public const string Delete = $"{_section}.Delete"; 18 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Bootcamps/Constants/BootcampsOperationClaims.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Security.Attributes; 2 | 3 | namespace Application.Features.Bootcamps.Constants; 4 | 5 | [OperationClaimConstants] 6 | public static class BootcampsOperationClaims 7 | { 8 | private const string _section = "Bootcamps"; 9 | 10 | public const string Admin = $"{_section}.Admin"; 11 | 12 | public const string Read = $"{_section}.Read"; 13 | public const string Write = $"{_section}.Write"; 14 | 15 | public const string Create = $"{_section}.Create"; 16 | public const string Update = $"{_section}.Update"; 17 | public const string Delete = $"{_section}.Delete"; 18 | } 19 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Domain/Entities/ContactFormModel.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Persistence.Repositories; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Domain.Entities; 9 | public class ContactFormModel 10 | { 11 | public string Name { get; set; } 12 | public string Email { get; set; } 13 | public string Message { get; set; } 14 | 15 | public ContactFormModel() 16 | { 17 | } 18 | 19 | public ContactFormModel(string name, string email, string message) 20 | { 21 | Name = name; 22 | Email = email; 23 | Message = message; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /tests/NArchBootcampProject.Application.Tests/DependencyResolvers/AuthServiceRegistrations.cs: -------------------------------------------------------------------------------- 1 | using Application.Features.Auth.Commands.Login; 2 | using Microsoft.Extensions.DependencyInjection; 3 | using StarterProject.Application.Tests.Mocks.FakeDatas; 4 | 5 | namespace StarterProject.Application.Tests.DependencyResolvers; 6 | 7 | public static class AuthServiceRegistrations 8 | { 9 | public static void AddAuthServices(this IServiceCollection services) 10 | { 11 | services.AddTransient(); 12 | services.AddTransient(); 13 | services.AddTransient(); 14 | services.AddTransient(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Blacklists/Constants/BlacklistsOperationClaims.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Security.Attributes; 2 | 3 | namespace Application.Features.Blacklists.Constants; 4 | 5 | [OperationClaimConstants] 6 | public static class BlacklistsOperationClaims 7 | { 8 | private const string _section = "Blacklists"; 9 | 10 | public const string Admin = $"{_section}.Admin"; 11 | 12 | public const string Read = $"{_section}.Read"; 13 | public const string Write = $"{_section}.Write"; 14 | 15 | public const string Create = $"{_section}.Create"; 16 | public const string Update = $"{_section}.Update"; 17 | public const string Delete = $"{_section}.Delete"; 18 | } 19 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Blacklists/Queries/GetById/GetByIdBlacklistResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Blacklists.Queries.GetById; 4 | 5 | public class GetByIdBlacklistResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | public string Reason { get; set; } 9 | public DateTime Date { get; set; } 10 | public Guid ApplicantId { get; set; } 11 | public string ApplicantFirstName { get; set; } 12 | public string ApplicantLastName { get; set; } 13 | public string ApplicantEmail { get; set; } 14 | public DateTime CreatedDate { get; set; } 15 | public DateTime UpdatedDate { get; set; } 16 | } 17 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/BootcampLogs/Commands/Update/UpdateBootcampLogCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.BootcampLogs.Commands.Update; 4 | 5 | public class UpdateBootcampLogCommandValidator : AbstractValidator 6 | { 7 | public UpdateBootcampLogCommandValidator() 8 | { 9 | RuleFor(c => c.Id).NotEmpty(); 10 | RuleFor(c => c.BootcampId).NotEmpty(); 11 | RuleFor(c => c.ChapterId).NotEmpty(); 12 | RuleFor(c => c.UserId).NotEmpty(); 13 | RuleFor(c => c.Status).NotEmpty(); 14 | RuleFor(c => c.Bootcamp).NotEmpty(); 15 | RuleFor(c => c.User).NotEmpty(); 16 | } 17 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/BootcampLogs/Constants/BootcampLogsOperationClaims.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Security.Attributes; 2 | 3 | namespace Application.Features.BootcampLogs.Constants; 4 | 5 | [OperationClaimConstants] 6 | public static class BootcampLogsOperationClaims 7 | { 8 | private const string _section = "BootcampLogs"; 9 | 10 | public const string Admin = $"{_section}.Admin"; 11 | 12 | public const string Read = $"{_section}.Read"; 13 | public const string Write = $"{_section}.Write"; 14 | 15 | public const string Create = $"{_section}.Create"; 16 | public const string Update = $"{_section}.Update"; 17 | public const string Delete = $"{_section}.Delete"; 18 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Bootcamps/Commands/Update/UpdateBootcampCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using FluentValidation; 2 | 3 | namespace Application.Features.Bootcamps.Commands.Update; 4 | 5 | public class UpdateBootcampCommandValidator : AbstractValidator 6 | { 7 | public UpdateBootcampCommandValidator() 8 | { 9 | RuleFor(c => c.Id).NotEmpty(); 10 | RuleFor(c => c.Name).NotEmpty(); 11 | RuleFor(c => c.InstructorId).NotEmpty(); 12 | RuleFor(c => c.StartDate).NotEmpty(); 13 | RuleFor(c => c.EndDate).NotEmpty(); 14 | RuleFor(c => c.BootcampStateId).NotEmpty(); 15 | RuleFor(c=> c.Description).NotEmpty(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Comments/Queries/GetById/GetByIdCommentResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Comments.Queries.GetById; 4 | 5 | public class GetByIdCommentResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | public string Context { get; set; } 9 | public int BootcampId { get; set; } 10 | public string BootcampName { get; set; } 11 | public Guid UserId { get; set; } 12 | public string UserEmail { get; set; } 13 | public string UserFirstName { get; set; } 14 | public string UserLastName { get; set; } 15 | public bool Status { get; set; } 16 | public DateTime CreatedDate { get; set; } 17 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Infrastructure/Infrastructure.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | net8.0 4 | enable 5 | enable 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/BootcampImages/Constants/BootcampImagesOperationClaims.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Security.Attributes; 2 | 3 | namespace Application.Features.BootcampImages.Constants; 4 | 5 | [OperationClaimConstants] 6 | public static class BootcampImagesOperationClaims 7 | { 8 | private const string _section = "BootcampImages"; 9 | 10 | public const string Admin = $"{_section}.Admin"; 11 | 12 | public const string Read = $"{_section}.Read"; 13 | public const string Write = $"{_section}.Write"; 14 | 15 | public const string Create = $"{_section}.Create"; 16 | public const string Update = $"{_section}.Update"; 17 | public const string Delete = $"{_section}.Delete"; 18 | } 19 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/BootcampStates/Constants/BootcampStatesOperationClaims.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Security.Attributes; 2 | 3 | namespace Application.Features.BootcampStates.Constants; 4 | 5 | [OperationClaimConstants] 6 | public static class BootcampStatesOperationClaims 7 | { 8 | private const string _section = "BootcampStates"; 9 | 10 | public const string Admin = $"{_section}.Admin"; 11 | 12 | public const string Read = $"{_section}.Read"; 13 | public const string Write = $"{_section}.Write"; 14 | 15 | public const string Create = $"{_section}.Create"; 16 | public const string Update = $"{_section}.Update"; 17 | public const string Delete = $"{_section}.Delete"; 18 | } 19 | -------------------------------------------------------------------------------- /tests/NArchBootcampProject.Application.Tests/Mocks/FakeDatas/OperationClaimFakeData.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using NArchitecture.Core.Test.Application.FakeData; 3 | 4 | namespace StarterProject.Application.Tests.Mocks.FakeDatas; 5 | 6 | public class OperationClaimFakeData : BaseFakeData 7 | { 8 | public override List CreateFakeData() 9 | { 10 | return 11 | [ 12 | new() { Id = 1, Name = "Admin" }, 13 | new() { Id = 2, Name = "Example.Create" }, 14 | new() { Id = 3, Name = "Example.Delete" }, 15 | new() { Id = 4, Name = "Example.Update" }, 16 | new() { Id = 5, Name = "Moderator" }, 17 | ]; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Employees/Queries/GetById/GetByIdEmployeeResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Employees.Queries.GetById; 4 | 5 | public class GetByIdEmployeeResponse : IResponse 6 | { 7 | public Guid Id { get; set; } 8 | public string UserName { get; set; } 9 | public string FirstName { get; set; } 10 | public string LastName { get; set; } 11 | public DateTime DateOfBirth { get; set; } 12 | public string NationalIdentity { get; set; } 13 | public string Position { get; set; } 14 | public string Email { get; set; } 15 | public DateTime CreatedDate { get; set; } 16 | public DateTime UpdatedDate { get; set; } 17 | } 18 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Applicants/Queries/GetById/GetByIdApplicantResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Applicants.Queries.GetById; 4 | 5 | public class GetByIdApplicantResponse : IResponse 6 | { 7 | public Guid Id { get; set; } 8 | public string UserName { get; set; } 9 | public string FirstName { get; set; } 10 | public string LastName { get; set; } 11 | public string Email { get; set; } 12 | public DateTime DateOfBirth { get; set; } 13 | public string NationalIdentity { get; set; } 14 | public string About { get; set; } 15 | public DateTime CreatedDate { get; set; } 16 | public DateTime UpdatedDate { get; set; } 17 | } 18 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Instructors/Queries/GetList/GetListInstructorListItemDto.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Dtos; 2 | 3 | namespace Application.Features.Instructors.Queries.GetList; 4 | 5 | public class GetListInstructorListItemDto : IDto 6 | { 7 | public Guid Id { get; set; } 8 | public string UserName { get; set; } 9 | public string FirstName { get; set; } 10 | public string LastName { get; set; } 11 | public string Description { get; set; } 12 | public DateTime DateOfBirth { get; set; } 13 | public string NationalIdentity { get; set; } 14 | public string CompanyName { get; set; } 15 | public string Email { get; set; } 16 | public DateTime CreatedDate { get; set; } 17 | } 18 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Domain/Entities/Certificate.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Persistence.Repositories; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Domain.Entities; 9 | public class Certificate : Entity 10 | { 11 | public Guid UserId { get; set; } 12 | public int BootcampId { get; set; } 13 | public virtual User User { get; set; } 14 | public virtual Bootcamp Bootcamp { get; set; } 15 | 16 | public Certificate() {} 17 | 18 | public Certificate(Guid id,Guid applicantId, int bootcampId) 19 | { 20 | Id = id; 21 | UserId = applicantId; 22 | BootcampId = bootcampId; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Domain/Domain.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | net8.0 4 | enable 5 | enable 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Auth/Commands/Register/RegisteredResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | using NArchitecture.Core.Security.JWT; 3 | 4 | namespace Application.Features.Auth.Commands.Register; 5 | 6 | public class RegisteredResponse : IResponse 7 | { 8 | public AccessToken AccessToken { get; set; } 9 | public Domain.Entities.RefreshToken RefreshToken { get; set; } 10 | 11 | public RegisteredResponse() 12 | { 13 | AccessToken = null!; 14 | RefreshToken = null!; 15 | } 16 | 17 | public RegisteredResponse(AccessToken accessToken, Domain.Entities.RefreshToken refreshToken) 18 | { 19 | AccessToken = accessToken; 20 | RefreshToken = refreshToken; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/ApplicationInformations/Constants/ApplicationInformationsOperationClaims.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Security.Attributes; 2 | 3 | namespace Application.Features.ApplicationInformations.Constants; 4 | 5 | [OperationClaimConstants] 6 | public static class ApplicationInformationsOperationClaims 7 | { 8 | private const string _section = "ApplicationInformations"; 9 | 10 | public const string Admin = $"{_section}.Admin"; 11 | 12 | public const string Read = $"{_section}.Read"; 13 | public const string Write = $"{_section}.Write"; 14 | 15 | public const string Create = $"{_section}.Create"; 16 | public const string Update = $"{_section}.Update"; 17 | public const string Delete = $"{_section}.Delete"; 18 | } 19 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Employees/Constants/EmployeesOperationClaims.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Security.Attributes; 2 | 3 | namespace Application.Features.Employees.Constants; 4 | 5 | [OperationClaimConstants] 6 | public static class EmployeesOperationClaims 7 | { 8 | private const string _section = "Employees"; 9 | 10 | public const string Admin = $"{_section}.Admin"; 11 | 12 | public const string Read = $"{_section}.Read"; 13 | public const string Write = $"{_section}.Write"; 14 | 15 | public const string Create = $"{_section}.Create"; 16 | public const string Update = $"{_section}.Update"; 17 | public const string Delete = $"{_section}.Delete"; 18 | public const string EmployeeRole = $"{_section}.EmployeeRole"; 19 | } 20 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Applicants/Constants/ApplicantsOperationClaims.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Security.Attributes; 2 | 3 | namespace Application.Features.Applicants.Constants; 4 | 5 | [OperationClaimConstants] 6 | public static class ApplicantsOperationClaims 7 | { 8 | private const string _section = "Applicants"; 9 | 10 | public const string Admin = $"{_section}.Admin"; 11 | 12 | public const string Read = $"{_section}.Read"; 13 | public const string Write = $"{_section}.Write"; 14 | 15 | public const string Create = $"{_section}.Create"; 16 | public const string Update = $"{_section}.Update"; 17 | public const string Delete = $"{_section}.Delete"; 18 | 19 | public const string ApplicantRole = $"{_section}.ApplicantRole"; 20 | } 21 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/ApplicationInformations/Queries/GetList/GetListApplicationInformationListItemDto.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Dtos; 2 | 3 | namespace Application.Features.ApplicationInformations.Queries.GetList; 4 | 5 | public class GetListApplicationInformationListItemDto : IDto 6 | { 7 | public int Id { get; set; } 8 | public Guid ApplicantId { get; set; } 9 | public string ApplicantFirstName { get; set; } 10 | public string ApplicantLastName { get; set; } 11 | public int BootcampId { get; set; } 12 | public string BootcampName { get; set; } 13 | public string ApplicationStateInformationName { get; set; } 14 | public short ApplicationStateInformationId { get; set; } 15 | public DateTime CreatedDate { get; set; } 16 | } 17 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Instructors/Constants/InstructorsOperationClaims.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Security.Attributes; 2 | 3 | namespace Application.Features.Instructors.Constants; 4 | 5 | [OperationClaimConstants] 6 | public static class InstructorsOperationClaims 7 | { 8 | private const string _section = "Instructors"; 9 | 10 | public const string Admin = $"{_section}.Admin"; 11 | 12 | public const string Read = $"{_section}.Read"; 13 | public const string Write = $"{_section}.Write"; 14 | 15 | public const string Create = $"{_section}.Create"; 16 | public const string Update = $"{_section}.Update"; 17 | public const string Delete = $"{_section}.Delete"; 18 | public const string InstructorRole = $"{_section}.InstructorRole"; 19 | } 20 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/ApplicationInformations/Queries/GetById/GetByIdApplicationInformationResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.ApplicationInformations.Queries.GetById; 4 | 5 | public class GetByIdApplicationInformationResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | public Guid ApplicantId { get; set; } 9 | public string ApplicantFirstName { get; set; } 10 | public string ApplicantLastName { get; set; } 11 | public int BootcampId { get; set; } 12 | public string BootcampName { get; set; } 13 | public string ApplicationStateInformationName { get; set; } 14 | public short ApplicationStateInformationId { get; set; } 15 | public DateTime CreatedDate { get; set; } 16 | } 17 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/ApplicationStateInformations/Constants/ApplicationStateInformationsOperationClaims.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Security.Attributes; 2 | 3 | namespace Application.Features.ApplicationStateInformations.Constants; 4 | 5 | [OperationClaimConstants] 6 | public static class ApplicationStateInformationsOperationClaims 7 | { 8 | private const string _section = "ApplicationStateInformations"; 9 | 10 | public const string Admin = $"{_section}.Admin"; 11 | 12 | public const string Read = $"{_section}.Read"; 13 | public const string Write = $"{_section}.Write"; 14 | 15 | public const string Create = $"{_section}.Create"; 16 | public const string Update = $"{_section}.Update"; 17 | public const string Delete = $"{_section}.Delete"; 18 | } 19 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Auth/Commands/RefreshToken/RefreshedTokensResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | using NArchitecture.Core.Security.JWT; 3 | 4 | namespace Application.Features.Auth.Commands.RefreshToken; 5 | 6 | public class RefreshedTokensResponse : IResponse 7 | { 8 | public AccessToken AccessToken { get; set; } 9 | public Domain.Entities.RefreshToken RefreshToken { get; set; } 10 | 11 | public RefreshedTokensResponse() 12 | { 13 | AccessToken = null!; 14 | RefreshToken = null!; 15 | } 16 | 17 | public RefreshedTokensResponse(AccessToken accessToken, Domain.Entities.RefreshToken refreshToken) 18 | { 19 | AccessToken = accessToken; 20 | RefreshToken = refreshToken; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Instructors/Queries/GetById/GetByIdInstructorResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Instructors.Queries.GetById; 4 | 5 | public class GetByIdInstructorResponse : IResponse 6 | { 7 | public Guid Id { get; set; } 8 | public string UserName { get; set; } 9 | public string FirstName { get; set; } 10 | public string LastName { get; set; } 11 | public string Description { get; set; } 12 | public DateTime DateOfBirth { get; set; } 13 | public string NationalIdentity { get; set; } 14 | public string CompanyName { get; set; } 15 | public string Email { get; set; } 16 | public DateTime CreatedDate { get; set; } 17 | public DateTime UpdatedDate { get; set; } 18 | } 19 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Comments/Queries/GetListByBootcampId/GetListCommentListByBootcampIdItemDto.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Dtos; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Application.Features.Comments.Queries.GetListByBootcampId; 9 | public class GetListCommentListByBootcampIdItemDto : IDto 10 | { 11 | public int Id { get; set; } 12 | public string Context { get; set; } 13 | public int BootcampId { get; set; } 14 | public string BootcampName { get; set; } 15 | public Guid UserId { get; set; } 16 | public string UserFirstName { get; set; } 17 | public string UserLastName { get; set; } 18 | public bool Status { get; set; } 19 | } 20 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Auth/Resources/Locales/auth.en.yaml: -------------------------------------------------------------------------------- 1 | EmailAuthenticatorDontExists: "Email authenticator don't exists." 2 | OtpAuthenticatorDontExists: "OTP authenticator don't exists." 3 | AlreadyVerifiedOtpAuthenticatorIsExists: "Already verified OTP authenticator is exists." 4 | EmailActivationKeyDontExists: "Email Activation Key don't exists." 5 | UserDontExists: "User don't exists." 6 | UserHaveAlreadyAAuthenticator: "User have already a authenticator." 7 | RefreshDontExists: "Refresh don't exists." 8 | InvalidRefreshToken: "Invalid refresh token." 9 | UserMailAlreadyExists: "User mail already exists." 10 | PasswordDontMatch: "Password don't match." 11 | PasswordResetRequestExpired : "Password Reset Request Expired" 12 | PasswordShouldNotBeSameAsOld : "Password Should Not Be Same As Old" -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Bootcamps/Queries/GetList/GetListBootcampListItemDto.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Dtos; 2 | 3 | namespace Application.Features.Bootcamps.Queries.GetList; 4 | 5 | public class GetListBootcampListItemDto : IDto 6 | { 7 | public int Id { get; set; } 8 | public string Name { get; set; } 9 | public Guid InstructorId { get; set; } 10 | public DateTime StartDate { get; set; } 11 | public DateTime EndDate { get; set; } 12 | public short BootcampStateId { get; set; } 13 | public string InstructorFirstName { get; set; } 14 | public string InstructorLastName { get; set;} 15 | public string BootcampStateName { get; set; } 16 | public string BootcampImageImagePath { get; set; } 17 | public string Description { get; set; } 18 | } 19 | -------------------------------------------------------------------------------- /.github/workflows/dotnet.yml: -------------------------------------------------------------------------------- 1 | name: .NET 2 | 3 | on: 4 | push: 5 | branches: ["main"] 6 | pull_request: 7 | branches: ["main"] 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - uses: actions/checkout@v3 15 | with: 16 | submodules: recursive 17 | - name: Setup .NET 18 | uses: actions/setup-dotnet@v3 19 | with: 20 | dotnet-version: 7.0.x 21 | - name: Restore dependencies 22 | run: dotnet restore 23 | - name: Build 24 | run: dotnet build --no-restore 25 | - name: Test 26 | run: dotnet test --no-build --verbosity normal 27 | - name: Restore tool dependencies 28 | run: dotnet tool restore 29 | - name: Check format 30 | run: dotnet csharpier --check . 31 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Bootcamps/Commands/Create/CreatedBootcampResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Bootcamps.Commands.Create; 4 | 5 | public class CreatedBootcampResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | public string Name { get; set; } 9 | public Guid InstructorId { get; set; } 10 | public DateTime StartDate { get; set; } 11 | public DateTime EndDate { get; set; } 12 | public short BootcampStateId { get; set; } 13 | public string InstructorFirstName { get; set; } 14 | public string InstructorLastName { get; set; } 15 | public string BootcampStateName { get; set; } 16 | public string BootcampImageImagePath { get; set; } 17 | public string Description { get; set; } 18 | } 19 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Bootcamps/Commands/Update/UpdatedBootcampResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Bootcamps.Commands.Update; 4 | 5 | public class UpdatedBootcampResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | public string Name { get; set; } 9 | public Guid InstructorId { get; set; } 10 | public DateTime StartDate { get; set; } 11 | public DateTime EndDate { get; set; } 12 | public short BootcampStateId { get; set; } 13 | public string InstructorFirstName { get; set; } 14 | public string InstructorLastName { get; set; } 15 | public string BootcampStateName { get; set; } 16 | public string BootcampImageImagePath { get; set; } 17 | public string Description { get; set; } 18 | } 19 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/WebAPI/Controllers/ContactController.cs: -------------------------------------------------------------------------------- 1 | using Application.Features.Contact.SendEmail; 2 | using Domain.Entities; 3 | using MediatR; 4 | using Microsoft.AspNetCore.Http; 5 | using Microsoft.AspNetCore.Mvc; 6 | 7 | namespace WebAPI.Controllers; 8 | [Route("api/[controller]")] 9 | [ApiController] 10 | public class ContactController : BaseController 11 | { 12 | private readonly IMediator _mediator; 13 | 14 | public ContactController(IMediator mediator) 15 | { 16 | _mediator = mediator; 17 | } 18 | 19 | [HttpPost("send-email")] 20 | public async Task SendEmail([FromBody] ContactFormModel model) 21 | { 22 | await _mediator.Send(new SendEmailCommand(model)); 23 | return Ok(new { message = "Email sent successfully" }); 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Domain/Entities/Comment.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Persistence.Repositories; 2 | 3 | namespace Domain.Entities; 4 | public class Comment:Entity 5 | { 6 | public string Context { get; set; } 7 | public int BootcampId { get; set; } 8 | public virtual Bootcamp Bootcamp { get; set; } 9 | public Guid UserId { get; set; } 10 | public virtual User User { get; set;} 11 | public bool Status { get; set; } 12 | 13 | public Comment() 14 | { 15 | 16 | } 17 | 18 | public Comment(string context, int bootcampId, Bootcamp bootcamp, Guid userId, User user, bool status) 19 | { 20 | Context = context; 21 | BootcampId = bootcampId; 22 | Bootcamp = bootcamp; 23 | UserId = userId; 24 | User = user; 25 | Status = status; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Bootcamps/Queries/GetById/GetByIdBootcampResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Bootcamps.Queries.GetById; 4 | 5 | public class GetByIdBootcampResponse : IResponse 6 | { 7 | public int Id { get; set; } 8 | public string Name { get; set; } 9 | public Guid InstructorId { get; set; } 10 | public DateTime StartDate { get; set; } 11 | public DateTime EndDate { get; set; } 12 | public short BootcampStateId { get; set; } 13 | public string InstructorFirstName { get; set; } 14 | public string InstructorLastName { get; set; } 15 | public string InstructorDescription { get; set; } 16 | public string BootcampStateName { get; set; } 17 | public string BootcampImageImagePath { get; set; } 18 | public string Description { get; set; } 19 | } 20 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Domain/Entities/Chapter.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Persistence.Repositories; 2 | 3 | namespace Domain.Entities; 4 | public class Chapter: Entity 5 | { 6 | public int Sort { get; set; } 7 | public string Title { get; set; } 8 | public string? Description { get; set; } 9 | public string Link { get; set; } 10 | public int BootcampId { get; set; } 11 | public int Time { get; set; } 12 | public virtual Bootcamp Bootcamp { get; set; } 13 | 14 | public Chapter() 15 | { 16 | } 17 | 18 | public Chapter(int sort, string title, string? description, string link, int bootcampId, int time, Bootcamp bootcamp) 19 | { 20 | Sort = sort; 21 | Title = title; 22 | Description = description; 23 | Link = link; 24 | BootcampId = bootcampId; 25 | Time = time; 26 | Bootcamp = bootcamp; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Auth/Commands/Login/LoggedResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | using NArchitecture.Core.Security.Enums; 3 | using NArchitecture.Core.Security.JWT; 4 | 5 | namespace Application.Features.Auth.Commands.Login; 6 | 7 | public class LoggedResponse : IResponse 8 | { 9 | public AccessToken? AccessToken { get; set; } 10 | public Domain.Entities.RefreshToken? RefreshToken { get; set; } 11 | public AuthenticatorType? RequiredAuthenticatorType { get; set; } 12 | 13 | public LoggedHttpResponse ToHttpResponse() 14 | { 15 | return new() { AccessToken = AccessToken, RequiredAuthenticatorType = RequiredAuthenticatorType }; 16 | } 17 | 18 | public class LoggedHttpResponse 19 | { 20 | public AccessToken? AccessToken { get; set; } 21 | public AuthenticatorType? RequiredAuthenticatorType { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Users/Queries/GetList/GetListUserListItemDto.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Dtos; 2 | 3 | namespace Application.Features.Users.Queries.GetList; 4 | 5 | public class GetListUserListItemDto : IDto 6 | { 7 | public Guid Id { get; set; } 8 | public string FirstName { get; set; } 9 | public string LastName { get; set; } 10 | public string Email { get; set; } 11 | public bool Status { get; set; } 12 | 13 | public GetListUserListItemDto() 14 | { 15 | FirstName = string.Empty; 16 | LastName = string.Empty; 17 | Email = string.Empty; 18 | } 19 | 20 | public GetListUserListItemDto(Guid id, string firstName, string lastName, string email, bool status) 21 | { 22 | Id = id; 23 | FirstName = firstName; 24 | LastName = lastName; 25 | Email = email; 26 | Status = status; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Persistence/EntityConfigurations/EmployeeConfiguration.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using Microsoft.EntityFrameworkCore; 3 | using Microsoft.EntityFrameworkCore.Metadata.Builders; 4 | 5 | namespace Persistence.EntityConfigurations; 6 | 7 | public class EmployeeConfiguration : IEntityTypeConfiguration 8 | { 9 | public void Configure(EntityTypeBuilder builder) 10 | { 11 | builder.ToTable("Employees"); 12 | 13 | builder.Property(e => e.Id).HasColumnName("Id").IsRequired(); 14 | builder.Property(e => e.Position).HasColumnName("Position"); 15 | builder.Property(e => e.CreatedDate).HasColumnName("CreatedDate").IsRequired(); 16 | builder.Property(e => e.UpdatedDate).HasColumnName("UpdatedDate"); 17 | builder.Property(e => e.DeletedDate).HasColumnName("DeletedDate"); 18 | 19 | //builder.HasQueryFilter(e => !e.DeletedDate.HasValue); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ElasticSearch/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:59842", 8 | "sslPort": 0 9 | } 10 | }, 11 | "profiles": { 12 | "http": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": true, 16 | "launchUrl": "weatherforecast", 17 | "applicationUrl": "http://localhost:5153", 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | }, 22 | "IIS Express": { 23 | "commandName": "IISExpress", 24 | "launchBrowser": true, 25 | "launchUrl": "weatherforecast", 26 | "environmentVariables": { 27 | "ASPNETCORE_ENVIRONMENT": "Development" 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Services/AuthService/IAuthService.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using NArchitecture.Core.Security.JWT; 3 | 4 | namespace Application.Services.AuthService; 5 | 6 | public interface IAuthService 7 | { 8 | public Task CreateAccessToken(User user); 9 | public Task CreateRefreshToken(User user, string ipAddress); 10 | public Task GetRefreshTokenByToken(string refreshToken); 11 | public Task AddRefreshToken(RefreshToken refreshToken); 12 | public Task DeleteOldRefreshTokens(Guid userId); 13 | public Task RevokeDescendantRefreshTokens(RefreshToken refreshToken, string ipAddress, string reason); 14 | 15 | public Task RevokeRefreshToken(RefreshToken token, string ipAddress, string? reason = null, string? replacedByToken = null); 16 | 17 | public Task RotateRefreshToken(User user, RefreshToken refreshToken, string ipAddress); 18 | } 19 | -------------------------------------------------------------------------------- /tests/NArchBootcampProject.Application.Tests/Mocks/Repositories/Auth/MockRefreshTokenRepository.cs: -------------------------------------------------------------------------------- 1 | using Application.Services.Repositories; 2 | using Moq; 3 | using StarterProject.Application.Tests.Mocks.FakeDatas; 4 | 5 | namespace StarterProject.Application.Tests.Mocks.Repositories.Auth; 6 | 7 | public class MockRefreshTokenRepository 8 | { 9 | private readonly RefreshTokenFakeData _refreshTokenFakeData; 10 | 11 | public MockRefreshTokenRepository(RefreshTokenFakeData refreshTokenFakeData) 12 | { 13 | _refreshTokenFakeData = refreshTokenFakeData; 14 | } 15 | 16 | public IRefreshTokenRepository GetMockRefreshTokenRepository() 17 | { 18 | List tokens = _refreshTokenFakeData.Data; 19 | var mockRepo = new Mock(); 20 | mockRepo.Setup(s => s.GetOldRefreshTokensAsync(It.IsAny(), It.IsAny())).ReturnsAsync(() => tokens); 21 | return mockRepo.Object; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Persistence/EntityConfigurations/ApplicantConfiguration.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using Microsoft.EntityFrameworkCore; 3 | using Microsoft.EntityFrameworkCore.Metadata.Builders; 4 | 5 | namespace Persistence.EntityConfigurations; 6 | 7 | public class ApplicantConfiguration : IEntityTypeConfiguration 8 | { 9 | public void Configure(EntityTypeBuilder builder) 10 | { 11 | builder.ToTable("Applicants"); 12 | 13 | builder.Property(a => a.Id).HasColumnName("Id").IsRequired(); 14 | builder.Property(a => a.About).HasColumnName("About"); 15 | builder.Property(a => a.CreatedDate).HasColumnName("CreatedDate").IsRequired(); 16 | builder.Property(a => a.UpdatedDate).HasColumnName("UpdatedDate"); 17 | builder.Property(a => a.DeletedDate).HasColumnName("DeletedDate"); 18 | 19 | builder.HasMany(p => p.ApplicationInformations); 20 | 21 | //builder.HasQueryFilter(a => !a.DeletedDate.HasValue); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Persistence/EntityConfigurations/InstructorConfiguration.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using Microsoft.EntityFrameworkCore; 3 | using Microsoft.EntityFrameworkCore.Metadata.Builders; 4 | 5 | namespace Persistence.EntityConfigurations; 6 | 7 | public class InstructorConfiguration : IEntityTypeConfiguration 8 | { 9 | public void Configure(EntityTypeBuilder builder) 10 | { 11 | builder.ToTable("Instructors"); 12 | 13 | builder.Property(i => i.Id).HasColumnName("Id").IsRequired(); 14 | builder.Property(i => i.CompanyName).HasColumnName("CompanyName"); 15 | builder.Property(i => i.CreatedDate).HasColumnName("CreatedDate").IsRequired(); 16 | builder.Property(i => i.UpdatedDate).HasColumnName("UpdatedDate"); 17 | builder.Property(i => i.DeletedDate).HasColumnName("DeletedDate"); 18 | 19 | //builder.HasOne(x => x.Bootcamps); 20 | 21 | //builder.HasQueryFilter(i => !i.DeletedDate.HasValue); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Persistence/Repositories/UserOperationClaimRepository.cs: -------------------------------------------------------------------------------- 1 | using Application.Services.Repositories; 2 | using Domain.Entities; 3 | using Microsoft.EntityFrameworkCore; 4 | using NArchitecture.Core.Persistence.Repositories; 5 | using Persistence.Contexts; 6 | 7 | namespace Persistence.Repositories; 8 | 9 | public class UserOperationClaimRepository 10 | : EfRepositoryBase, 11 | IUserOperationClaimRepository 12 | { 13 | public UserOperationClaimRepository(BaseDbContext context) 14 | : base(context) { } 15 | 16 | public async Task> GetOperationClaimsByUserIdAsync(Guid userId) 17 | { 18 | List operationClaims = await Query() 19 | .AsNoTracking() 20 | .Where(p => p.UserId.Equals(userId)) 21 | .Select(p => new OperationClaim { Id = p.OperationClaimId, Name = p.OperationClaim.Name }) 22 | .ToListAsync(); 23 | return operationClaims; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Persistence/EntityConfigurations/BootcampImageConfiguration.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using Microsoft.EntityFrameworkCore; 3 | using Microsoft.EntityFrameworkCore.Metadata.Builders; 4 | 5 | namespace Persistence.EntityConfigurations; 6 | 7 | public class BootcampImageConfiguration : IEntityTypeConfiguration 8 | { 9 | public void Configure(EntityTypeBuilder builder) 10 | { 11 | builder.ToTable("BootcampImages"); 12 | 13 | builder.Property(bi => bi.Id).HasColumnName("Id").IsRequired(); 14 | builder.Property(bi => bi.BootcampId).HasColumnName("BootcampId"); 15 | builder.Property(bi => bi.ImagePath).HasColumnName("ImagePath"); 16 | builder.Property(bi => bi.CreatedDate).HasColumnName("CreatedDate").IsRequired(); 17 | builder.Property(bi => bi.UpdatedDate).HasColumnName("UpdatedDate"); 18 | builder.Property(bi => bi.DeletedDate).HasColumnName("DeletedDate"); 19 | 20 | builder.HasQueryFilter(bi => !bi.DeletedDate.HasValue); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Users/Queries/GetById/GetByIdUserResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | 3 | namespace Application.Features.Users.Queries.GetById; 4 | 5 | public class GetByIdUserResponse : IResponse 6 | { 7 | public Guid Id { get; set; } 8 | public string UserName { get; set; } 9 | public string FirstName { get; set; } 10 | public string LastName { get; set; } 11 | public DateTime DateOfBirth { get; set; } 12 | public string NationalIdentity { get; set; } 13 | public string Email { get; set; } 14 | public bool Status { get; set; } 15 | 16 | public GetByIdUserResponse() 17 | { 18 | FirstName = string.Empty; 19 | LastName = string.Empty; 20 | Email = string.Empty; 21 | } 22 | 23 | public GetByIdUserResponse(Guid id, string firstName, string lastName, string email, bool status) 24 | { 25 | Id = id; 26 | FirstName = firstName; 27 | LastName = lastName; 28 | Email = email; 29 | Status = status; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Persistence/EntityConfigurations/AnnouncementConfiguration.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using Microsoft.EntityFrameworkCore; 3 | using Microsoft.EntityFrameworkCore.Metadata.Builders; 4 | 5 | namespace Persistence.EntityConfigurations; 6 | 7 | public class AnnouncementConfiguration : IEntityTypeConfiguration 8 | { 9 | public void Configure(EntityTypeBuilder builder) 10 | { 11 | builder.ToTable("Announcements").HasKey(a => a.Id); 12 | 13 | builder.Property(a => a.Id).HasColumnName("Id").IsRequired(); 14 | builder.Property(a => a.Header).HasColumnName("Header").IsRequired(); 15 | builder.Property(a => a.Description).HasColumnName("Description").IsRequired(); 16 | builder.Property(a => a.CreatedDate).HasColumnName("CreatedDate").IsRequired(); 17 | builder.Property(a => a.UpdatedDate).HasColumnName("UpdatedDate"); 18 | builder.Property(a => a.DeletedDate).HasColumnName("DeletedDate"); 19 | 20 | builder.HasQueryFilter(a => !a.DeletedDate.HasValue); 21 | } 22 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Persistence/EntityConfigurations/CertificateConfiguration.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using Microsoft.EntityFrameworkCore; 3 | using Microsoft.EntityFrameworkCore.Metadata.Builders; 4 | 5 | namespace Persistence.EntityConfigurations; 6 | 7 | public class CertificateConfiguration : IEntityTypeConfiguration 8 | { 9 | public void Configure(EntityTypeBuilder builder) 10 | { 11 | builder.ToTable("Certificates").HasKey(c => c.Id); 12 | 13 | builder.Property(c => c.Id).HasColumnName("Id").IsRequired(); 14 | builder.Property(c => c.UserId).HasColumnName("ApplicantId").IsRequired(); 15 | builder.Property(c => c.BootcampId).HasColumnName("BootcampId").IsRequired(); 16 | builder.Property(c => c.CreatedDate).HasColumnName("CreatedDate").IsRequired(); 17 | builder.Property(c => c.UpdatedDate).HasColumnName("UpdatedDate"); 18 | builder.Property(c => c.DeletedDate).HasColumnName("DeletedDate"); 19 | 20 | builder.HasQueryFilter(c => !c.DeletedDate.HasValue); 21 | } 22 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Users/Commands/UpdateFromAuth/UpdatedUserFromAuthResponse.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Application.Responses; 2 | using NArchitecture.Core.Security.JWT; 3 | 4 | namespace Application.Features.Users.Commands.UpdateFromAuth; 5 | 6 | public class UpdatedUserFromAuthResponse : IResponse 7 | { 8 | public Guid Id { get; set; } 9 | public string FirstName { get; set; } 10 | public string LastName { get; set; } 11 | public string Email { get; set; } 12 | public AccessToken AccessToken { get; set; } 13 | 14 | public UpdatedUserFromAuthResponse() 15 | { 16 | FirstName = string.Empty; 17 | LastName = string.Empty; 18 | Email = string.Empty; 19 | AccessToken = null!; 20 | } 21 | 22 | public UpdatedUserFromAuthResponse(Guid id, string firstName, string lastName, string email, AccessToken accessToken) 23 | { 24 | Id = id; 25 | FirstName = firstName; 26 | LastName = lastName; 27 | Email = email; 28 | AccessToken = accessToken; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /tests/NArchBootcampProject.Application.Tests/Mocks/Configurations/MockConfiguration.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Configuration; 2 | 3 | namespace StarterProject.Application.Tests.Mocks.Configurations; 4 | 5 | public static class MockConfiguration 6 | { 7 | public static IConfiguration GetConfigurationMock() 8 | { 9 | var mockConfiguration = new Dictionary 10 | { 11 | { "TokenOptions:Audience", "Kodlamaio Users" }, 12 | { "TokenOptions:Issuer", "Kodlamaio" }, 13 | { "TokenOptions:AccessTokenExpiration", "10" }, 14 | { "TokenOptions:SecurityKey", "StrongAndSecretKeyStrongAndSecretKeyStrongAndSecretKeyStrongAndSecretKey" }, 15 | { "TokenOptions:RefreshTokenExpiration", "1440" }, 16 | { "TokenOptions:RefreshTokenTTL", "180" }, 17 | { "MailSettings:Server", "127.0.0.1" }, 18 | }; 19 | IConfigurationBuilder configuration = new ConfigurationBuilder().AddInMemoryCollection(mockConfiguration); 20 | return configuration.Build(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ElasticSearch/Controllers/WeatherForecastController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | 3 | namespace ElasticSearch.Controllers; 4 | [ApiController] 5 | [Route("[controller]")] 6 | public class WeatherForecastController : ControllerBase 7 | { 8 | private static readonly string[] Summaries = new[] 9 | { 10 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" 11 | }; 12 | 13 | private readonly ILogger _logger; 14 | 15 | public WeatherForecastController(ILogger logger) 16 | { 17 | _logger = logger; 18 | } 19 | 20 | [HttpGet] 21 | public IEnumerable Get() 22 | { 23 | return Enumerable.Range(1, 5).Select(index => new WeatherForecast 24 | { 25 | Date = DateOnly.FromDateTime(DateTime.Now.AddDays(index)), 26 | TemperatureC = Random.Shared.Next(-20, 55), 27 | Summary = Summaries[Random.Shared.Next(Summaries.Length)] 28 | }) 29 | .ToArray(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Services/ImageService/ImageServiceBase.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Http; 2 | using NArchitecture.Core.CrossCuttingConcerns.Exception.Types; 3 | 4 | namespace Application.Services.ImageService; 5 | 6 | public abstract class ImageServiceBase 7 | { 8 | public abstract Task UploadAsync(IFormFile formFile); 9 | 10 | public async Task UpdateAsync(IFormFile formFile, string imageUrl) 11 | { 12 | await FileMustBeInImageFormat(formFile); 13 | 14 | await DeleteAsync(imageUrl); 15 | return await UploadAsync(formFile); 16 | } 17 | 18 | public abstract Task DeleteAsync(string imageUrl); 19 | 20 | protected async Task FileMustBeInImageFormat(IFormFile formFile) 21 | { 22 | List extensions = [".jpg", ".png", ".jpeg", ".webp"]; 23 | 24 | string extension = Path.GetExtension(formFile.FileName).ToLower(); 25 | if (!extensions.Contains(extension)) 26 | throw new BusinessException("Unsupported format"); 27 | await Task.CompletedTask; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Persistence/Repositories/RefreshTokenRepository.cs: -------------------------------------------------------------------------------- 1 | using Application.Services.Repositories; 2 | using Domain.Entities; 3 | using Microsoft.EntityFrameworkCore; 4 | using NArchitecture.Core.Persistence.Repositories; 5 | using Persistence.Contexts; 6 | 7 | namespace Persistence.Repositories; 8 | 9 | public class RefreshTokenRepository : EfRepositoryBase, IRefreshTokenRepository 10 | { 11 | public RefreshTokenRepository(BaseDbContext context) 12 | : base(context) { } 13 | 14 | public async Task> GetOldRefreshTokensAsync(Guid userId, int refreshTokenTtl) 15 | { 16 | List tokens = await Query() 17 | .AsNoTracking() 18 | .Where(r => 19 | r.UserId == userId 20 | && r.RevokedDate == null 21 | //&& r.ExpiresDate >= DateTime.UtcNow 22 | && r.CreatedDate.AddDays(refreshTokenTtl) <= DateTime.UtcNow 23 | ) 24 | .ToListAsync(); 25 | 26 | return tokens; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Persistence/Persistence.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | net8.0 4 | enable 5 | enable 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Kodlama.io 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Persistence/EntityConfigurations/BlacklistConfiguration.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using Microsoft.EntityFrameworkCore; 3 | using Microsoft.EntityFrameworkCore.Metadata.Builders; 4 | 5 | namespace Persistence.EntityConfigurations; 6 | 7 | public class BlacklistConfiguration : IEntityTypeConfiguration 8 | { 9 | public void Configure(EntityTypeBuilder builder) 10 | { 11 | builder.ToTable("Blacklists"); 12 | 13 | builder.Property(b => b.Id).HasColumnName("Id").IsRequired(); 14 | builder.Property(b => b.Reason).HasColumnName("Reason"); 15 | builder.Property(b => b.Date).HasColumnName("Date"); 16 | builder.Property(b => b.ApplicantId).HasColumnName("ApplicantId"); 17 | builder.Property(b => b.CreatedDate).HasColumnName("CreatedDate").IsRequired(); 18 | builder.Property(b => b.UpdatedDate).HasColumnName("UpdatedDate"); 19 | builder.Property(b => b.DeletedDate).HasColumnName("DeletedDate"); 20 | 21 | builder.HasOne(x => x.Applicant); 22 | 23 | builder.HasQueryFilter(b => !b.DeletedDate.HasValue); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Persistence/EntityConfigurations/CommentConfiguration.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using Microsoft.EntityFrameworkCore; 3 | using Microsoft.EntityFrameworkCore.Metadata.Builders; 4 | 5 | namespace Persistence.EntityConfigurations; 6 | 7 | public class CommentConfiguration : IEntityTypeConfiguration 8 | { 9 | public void Configure(EntityTypeBuilder builder) 10 | { 11 | builder.ToTable("Comments").HasKey(c => c.Id); 12 | 13 | builder.Property(c => c.Id).HasColumnName("Id").IsRequired(); 14 | builder.Property(c => c.Context).HasColumnName("Context"); 15 | builder.Property(c => c.BootcampId).HasColumnName("BootcampId"); 16 | builder.Property(c => c.UserId).HasColumnName("UserId"); 17 | builder.Property(c => c.Status).HasColumnName("Status"); 18 | builder.Property(c => c.CreatedDate).HasColumnName("CreatedDate").IsRequired(); 19 | builder.Property(c => c.UpdatedDate).HasColumnName("UpdatedDate"); 20 | builder.Property(c => c.DeletedDate).HasColumnName("DeletedDate"); 21 | 22 | builder.HasQueryFilter(c => !c.DeletedDate.HasValue); 23 | } 24 | } -------------------------------------------------------------------------------- /tests/NArchBootcampProject.Application.Tests/DependencyResolvers/UsersTestServiceRegistration.cs: -------------------------------------------------------------------------------- 1 | using Application.Features.Users.Commands.Create; 2 | using Application.Features.Users.Commands.Delete; 3 | using Application.Features.Users.Commands.Update; 4 | using Application.Features.Users.Queries.GetById; 5 | using Application.Features.Users.Queries.GetList; 6 | using Microsoft.Extensions.DependencyInjection; 7 | using StarterProject.Application.Tests.Mocks.FakeDatas; 8 | 9 | namespace StarterProject.Application.Tests.DependencyResolvers; 10 | 11 | public static class UsersTestServiceRegistration 12 | { 13 | public static void AddUsersServices(this IServiceCollection services) 14 | { 15 | services.AddTransient(); 16 | services.AddTransient(); 17 | services.AddTransient(); 18 | services.AddTransient(); 19 | services.AddTransient(); 20 | services.AddTransient(); 21 | services.AddSingleton(); 22 | services.AddSingleton(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Auth/Commands/Register/RegisterCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using System.Text.RegularExpressions; 2 | using FluentValidation; 3 | 4 | namespace Application.Features.Auth.Commands.Register; 5 | 6 | public class RegisterCommandValidator : AbstractValidator 7 | { 8 | public RegisterCommandValidator() 9 | { 10 | RuleFor(c => c.UserForRegisterDto.Email).NotEmpty().EmailAddress(); 11 | RuleFor(c => c.UserForRegisterDto.Password) 12 | .NotEmpty() 13 | .MinimumLength(6) 14 | .Must(StrongPassword) 15 | .WithMessage( 16 | "Password must contain at least one uppercase letter, one lowercase letter, one number and one special character." 17 | ); 18 | } 19 | 20 | private bool StrongPassword(string value) 21 | { 22 | Regex strongPasswordRegex = new("^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$", RegexOptions.Compiled); 23 | return true; // Geliştirme aşamasında eklendi. Kullanıcı kayıt olurken güçlü şifre ile uğraşmamak için. 24 | return strongPasswordRegex.IsMatch(value); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/WebAPI/Controllers/BaseController.cs: -------------------------------------------------------------------------------- 1 | using MediatR; 2 | using Microsoft.AspNetCore.Mvc; 3 | using NArchitecture.Core.Security.Extensions; 4 | 5 | namespace WebAPI.Controllers; 6 | 7 | public class BaseController : ControllerBase 8 | { 9 | protected IMediator Mediator => 10 | _mediator ??= 11 | HttpContext.RequestServices.GetService() 12 | ?? throw new InvalidOperationException("IMediator cannot be retrieved from request services."); 13 | 14 | private IMediator? _mediator; 15 | 16 | protected string getIpAddress() 17 | { 18 | string ipAddress = Request.Headers.ContainsKey("X-Forwarded-For") 19 | ? Request.Headers["X-Forwarded-For"].ToString() 20 | : HttpContext.Connection.RemoteIpAddress?.MapToIPv4().ToString() 21 | ?? throw new InvalidOperationException("IP address cannot be retrieved from request."); 22 | return ipAddress; 23 | } 24 | 25 | protected Guid getUserIdFromRequest() //todo authentication behavior? 26 | { 27 | var userId = Guid.Parse(HttpContext.User.GetUserId().ToString()!); 28 | return userId; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Users/Commands/UpdateFromAuth/UpdateUserFromAuthCommandValidator.cs: -------------------------------------------------------------------------------- 1 | using System.Text.RegularExpressions; 2 | using FluentValidation; 3 | 4 | namespace Application.Features.Users.Commands.UpdateFromAuth; 5 | 6 | public class UpdateUserFromAuthCommandValidator : AbstractValidator 7 | { 8 | public UpdateUserFromAuthCommandValidator() 9 | { 10 | RuleFor(c => c.FirstName).NotEmpty().MinimumLength(2); 11 | RuleFor(c => c.LastName).NotEmpty().MinimumLength(2); 12 | RuleFor(c => c.Password).NotEmpty().MinimumLength(8); 13 | RuleFor(c => c.NewPassword) 14 | .NotEmpty() 15 | .MinimumLength(8) 16 | .Must(StrongPassword) 17 | .WithMessage( 18 | "Your password must be at least 8 characters long and include at least one uppercase letter, one lowercase letter, and one special character." 19 | ); 20 | } 21 | 22 | private bool StrongPassword(string arg) 23 | { 24 | Regex regex = new("/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$/"); 25 | return regex.IsMatch(arg); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Domain/Entities/User.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Security.Entities; 2 | 3 | namespace Domain.Entities; 4 | 5 | public class User : User 6 | { 7 | public string UserName { get; set; } 8 | public string FirstName { get; set; } 9 | public string LastName { get; set; } 10 | public DateTime DateOfBirth { get; set; } 11 | public string NationalIdentity { get; set; } 12 | 13 | public User() 14 | { 15 | UserOperationClaims = new HashSet(); 16 | RefreshTokens = new HashSet(); 17 | OtpAuthenticators = new HashSet(); 18 | EmailAuthenticators = new HashSet(); 19 | } 20 | 21 | public virtual ICollection UserOperationClaims { get; set; } = default!; 22 | public virtual ICollection RefreshTokens { get; set; } = default!; 23 | public virtual ICollection OtpAuthenticators { get; set; } = default!; 24 | public virtual ICollection EmailAuthenticators { get; set; } = default!; 25 | public virtual ICollection Certificate { get; set; } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Features/Auth/Constants/AuthMessages.cs: -------------------------------------------------------------------------------- 1 | namespace Application.Features.Auth.Constants; 2 | 3 | public static class AuthMessages 4 | { 5 | public const string SectionName = "Auth"; 6 | 7 | public const string EmailAuthenticatorDontExists = "EmailAuthenticatorDontExists"; 8 | public const string OtpAuthenticatorDontExists = "OtpAuthenticatorDontExists"; 9 | public const string AlreadyVerifiedOtpAuthenticatorIsExists = "AlreadyVerifiedOtpAuthenticatorIsExists"; 10 | public const string EmailActivationKeyDontExists = "EmailActivationKeyDontExists"; 11 | public const string UserDontExists = "UserDontExists"; 12 | public const string UserHaveAlreadyAAuthenticator = "UserHaveAlreadyAAuthenticator"; 13 | public const string RefreshDontExists = "RefreshDontExists"; 14 | public const string InvalidRefreshToken = "InvalidRefreshToken"; 15 | public const string UserMailAlreadyExists = "UserMailAlreadyExists"; 16 | public const string PasswordDontMatch = "PasswordDontMatch"; 17 | public const string PasswordResetRequestExpired = "PasswordResetRequestExpired"; 18 | public const string PasswordShouldNotBeSameAsOld = "PasswordShouldNotBeSameAsOld"; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Domain/Entities/ApplicationInformation.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Persistence.Repositories; 2 | 3 | namespace Domain.Entities; 4 | 5 | public class ApplicationInformation : Entity 6 | { 7 | public Guid ApplicantId { get; set; } 8 | public int BootcampId { get; set; } 9 | public short ApplicationStateInformationId { get; set; } 10 | 11 | public virtual Applicant? Applicant { get; set; } 12 | public virtual Bootcamp? Bootcamp { get; set; } 13 | public virtual ApplicationStateInformation? ApplicationStateInformation { get; set; } 14 | 15 | public ApplicationInformation() { } 16 | 17 | public ApplicationInformation( 18 | Guid applicantId, 19 | int bootcampId, 20 | short applicationStateInformationId, 21 | Applicant? applicant, 22 | Bootcamp? bootcamp, 23 | ApplicationStateInformation? applicationStateInformation 24 | ) 25 | { 26 | ApplicantId = applicantId; 27 | BootcampId = bootcampId; 28 | ApplicationStateInformationId = applicationStateInformationId; 29 | Applicant = applicant; 30 | Bootcamp = bootcamp; 31 | ApplicationStateInformation = applicationStateInformation; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /tests/NArchBootcampProject.Application.Tests/Mocks/Repositories/Auth/MockUserOperationClaimRepository.cs: -------------------------------------------------------------------------------- 1 | using Application.Services.Repositories; 2 | using Moq; 3 | using StarterProject.Application.Tests.Mocks.FakeDatas; 4 | 5 | namespace StarterProject.Application.Tests.Mocks.Repositories.Auth; 6 | 7 | public class MockUserOperationClaimRepository 8 | { 9 | private readonly OperationClaimFakeData _operationClaimFakeData; 10 | 11 | public MockUserOperationClaimRepository(OperationClaimFakeData operationClaimFakeData) 12 | { 13 | _operationClaimFakeData = operationClaimFakeData; 14 | } 15 | 16 | public IUserOperationClaimRepository GetMockUserOperationClaimRepository() 17 | { 18 | List operationClaims = _operationClaimFakeData.Data; 19 | var mockRepo = new Mock(); 20 | 21 | mockRepo 22 | .Setup(s => s.GetOperationClaimsByUserIdAsync(It.IsAny())) 23 | .ReturnsAsync( 24 | (Guid userId) => 25 | { 26 | var claims = operationClaims.ToList(); 27 | return claims; 28 | } 29 | ); 30 | 31 | return mockRepo.Object; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Services/UsersService/IUserService.cs: -------------------------------------------------------------------------------- 1 | using System.Linq.Expressions; 2 | using Domain.Entities; 3 | using Microsoft.EntityFrameworkCore.Query; 4 | using NArchitecture.Core.Persistence.Paging; 5 | 6 | namespace Application.Services.UsersService; 7 | 8 | public interface IUserService 9 | { 10 | Task GetAsync( 11 | Expression> predicate, 12 | Func, IIncludableQueryable>? include = null, 13 | bool withDeleted = false, 14 | bool enableTracking = true, 15 | CancellationToken cancellationToken = default 16 | ); 17 | 18 | Task?> GetListAsync( 19 | Expression>? predicate = null, 20 | Func, IOrderedQueryable>? orderBy = null, 21 | Func, IIncludableQueryable>? include = null, 22 | int index = 0, 23 | int size = 10, 24 | bool withDeleted = false, 25 | bool enableTracking = true, 26 | CancellationToken cancellationToken = default 27 | ); 28 | 29 | Task AddAsync(User user); 30 | Task UpdateAsync(User user); 31 | Task DeleteAsync(User user, bool permanent = false); 32 | } 33 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Persistence/EntityConfigurations/BootcampLogConfiguration.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using Microsoft.EntityFrameworkCore; 3 | using Microsoft.EntityFrameworkCore.Metadata.Builders; 4 | 5 | namespace Persistence.EntityConfigurations; 6 | 7 | public class BootcampLogConfiguration : IEntityTypeConfiguration 8 | { 9 | public void Configure(EntityTypeBuilder builder) 10 | { 11 | builder.ToTable("BootcampLogs").HasKey(bl => bl.Id); 12 | 13 | builder.Property(bl => bl.Id).HasColumnName("Id").IsRequired(); 14 | builder.Property(bl => bl.BootcampId).HasColumnName("BootcampId"); 15 | builder.Property(bl => bl.ChapterId).HasColumnName("ChapterId"); 16 | builder.Property(bl => bl.UserId).HasColumnName("UserId"); 17 | builder.Property(bl => bl.Status).HasColumnName("Status"); 18 | builder.Property(bl => bl.CreatedDate).HasColumnName("CreatedDate").IsRequired(); 19 | builder.Property(bl => bl.UpdatedDate).HasColumnName("UpdatedDate"); 20 | builder.Property(bl => bl.DeletedDate).HasColumnName("DeletedDate"); 21 | 22 | builder.HasQueryFilter(bl => !bl.DeletedDate.HasValue); 23 | 24 | builder.HasOne(p => p.Bootcamp); 25 | builder.HasOne(p => p.User); 26 | } 27 | } -------------------------------------------------------------------------------- /src/nArchBootcampProject/Persistence/EntityConfigurations/OtpAuthenticatorConfiguration.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using Microsoft.EntityFrameworkCore; 3 | using Microsoft.EntityFrameworkCore.Metadata.Builders; 4 | 5 | namespace Persistence.EntityConfigurations; 6 | 7 | public class OtpAuthenticatorConfiguration : IEntityTypeConfiguration 8 | { 9 | public void Configure(EntityTypeBuilder builder) 10 | { 11 | builder.ToTable("OtpAuthenticators").HasKey(oa => oa.Id); 12 | 13 | builder.Property(oa => oa.Id).HasColumnName("Id").IsRequired(); 14 | builder.Property(oa => oa.UserId).HasColumnName("UserId").IsRequired(); 15 | builder.Property(oa => oa.SecretKey).HasColumnName("SecretKey").IsRequired(); 16 | builder.Property(oa => oa.IsVerified).HasColumnName("IsVerified").IsRequired(); 17 | builder.Property(oa => oa.CreatedDate).HasColumnName("CreatedDate").IsRequired(); 18 | builder.Property(oa => oa.UpdatedDate).HasColumnName("UpdatedDate"); 19 | builder.Property(oa => oa.DeletedDate).HasColumnName("DeletedDate"); 20 | 21 | builder.HasQueryFilter(oa => !oa.DeletedDate.HasValue); 22 | 23 | builder.HasOne(oa => oa.User); 24 | 25 | builder.HasBaseType((string)null!); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Persistence/EntityConfigurations/EmailAuthenticatorConfiguration.cs: -------------------------------------------------------------------------------- 1 | using Domain.Entities; 2 | using Microsoft.EntityFrameworkCore; 3 | using Microsoft.EntityFrameworkCore.Metadata.Builders; 4 | 5 | namespace Persistence.EntityConfigurations; 6 | 7 | public class EmailAuthenticatorConfiguration : IEntityTypeConfiguration 8 | { 9 | public void Configure(EntityTypeBuilder builder) 10 | { 11 | builder.ToTable("EmailAuthenticators").HasKey(ea => ea.Id); 12 | 13 | builder.Property(ea => ea.Id).HasColumnName("Id").IsRequired(); 14 | builder.Property(ea => ea.UserId).HasColumnName("UserId").IsRequired(); 15 | builder.Property(ea => ea.ActivationKey).HasColumnName("ActivationKey"); 16 | builder.Property(ea => ea.IsVerified).HasColumnName("IsVerified").IsRequired(); 17 | builder.Property(ea => ea.CreatedDate).HasColumnName("CreatedDate").IsRequired(); 18 | builder.Property(ea => ea.UpdatedDate).HasColumnName("UpdatedDate"); 19 | builder.Property(ea => ea.DeletedDate).HasColumnName("DeletedDate"); 20 | 21 | builder.HasQueryFilter(ea => !ea.DeletedDate.HasValue); 22 | 23 | builder.HasOne(ea => ea.User); 24 | 25 | builder.HasBaseType((string)null!); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/nArchBootcampProject/Application/Services/Chapters/IChapterService.cs: -------------------------------------------------------------------------------- 1 | using NArchitecture.Core.Persistence.Paging; 2 | using Domain.Entities; 3 | using Microsoft.EntityFrameworkCore.Query; 4 | using System.Linq.Expressions; 5 | 6 | namespace Application.Services.Chapters; 7 | 8 | public interface IChapterService 9 | { 10 | Task GetAsync( 11 | Expression> predicate, 12 | Func, IIncludableQueryable>? include = null, 13 | bool withDeleted = false, 14 | bool enableTracking = true, 15 | CancellationToken cancellationToken = default 16 | ); 17 | Task?> GetListAsync( 18 | Expression>? predicate = null, 19 | Func, IOrderedQueryable>? orderBy = null, 20 | Func, IIncludableQueryable>? include = null, 21 | int index = 0, 22 | int size = 10, 23 | bool withDeleted = false, 24 | bool enableTracking = true, 25 | CancellationToken cancellationToken = default 26 | ); 27 | Task AddAsync(Chapter chapter); 28 | Task UpdateAsync(Chapter chapter); 29 | Task DeleteAsync(Chapter chapter, bool permanent = false); 30 | } 31 | --------------------------------------------------------------------------------