Skip to content

Commit 88fdbf4

Browse files
authored
Feat/refacto naming (#97)
1 parent bde496f commit 88fdbf4

77 files changed

Lines changed: 1027 additions & 920 deletions

File tree

Some content is hidden

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

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ indent_size = 4
88
insert_final_newline = true
99
trim_trailing_whitespace = true
1010

11+
[*.kt]
12+
max_line_length = 165
13+
1114
[*.md]
1215
max_line_length = off
1316
trim_trailing_whitespace = false

backend/application/src/main/kotlin/com/adsearch/handler/GlobalExceptionHandler.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package com.adsearch.handler
22

33
import com.adsearch.domain.exception.BaseFunctionalException
44
import com.adsearch.domain.exception.BaseTechnicalException
5-
import com.adsearch.domain.model.enums.HttpStatusEnum
5+
import com.adsearch.domain.exception.enums.HttpStatusEnum
66
import com.adsearch.infrastructure.adapter.`in`.rest.dto.ErrorResponse
77
import jakarta.servlet.http.HttpServletRequest
88
import org.slf4j.LoggerFactory

backend/application/src/main/resources/db/changelog/changes/02-create-refresh-tokens-table.yaml

Lines changed: 0 additions & 46 deletions
This file was deleted.

backend/application/src/main/resources/db/changelog/changes/04-create-roles-table.yaml renamed to backend/application/src/main/resources/db/changelog/changes/02-create-roles-table.yaml

File renamed without changes.

backend/application/src/main/resources/db/changelog/changes/03-create-password-reset-tokens-table.yaml

Lines changed: 0 additions & 43 deletions
This file was deleted.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
databaseChangeLog:
2+
- changeSet:
3+
id: 20260214-1
4+
author: init
5+
changes:
6+
- createTable:
7+
tableName: T_TOKEN
8+
columns:
9+
- column:
10+
name: TKN_ID
11+
type: BIGINT
12+
autoIncrement: true
13+
constraints:
14+
primaryKey: true
15+
nullable: false
16+
- column:
17+
name: TKN_TYPE
18+
type: VARCHAR(50)
19+
constraints:
20+
nullable: false
21+
- column:
22+
name: USR_ID
23+
type: BIGINT
24+
constraints:
25+
nullable: false
26+
- column:
27+
name: TKN_VALUE
28+
type: VARCHAR(255)
29+
constraints:
30+
nullable: false
31+
- column:
32+
name: TKN_EXPIRY_DATE
33+
type: TIMESTAMP
34+
constraints:
35+
nullable: false
36+
- column:
37+
name: TKN_REVOKED
38+
type: BOOLEAN
39+
defaultValueBoolean: false
40+
constraints:
41+
nullable: false
42+
- addUniqueConstraint:
43+
tableName: T_TOKEN
44+
columnNames: TKN_VALUE, TKN_TYPE
45+
constraintName: UK_T_TOKEN_VALUE_TYPE

backend/application/src/main/resources/db/changelog/changes/05-merge-token-tables.yaml

Lines changed: 0 additions & 74 deletions
This file was deleted.
Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
databaseChangeLog:
2-
- include:
3-
file: changes/01-create-users-table.yaml
4-
relativeToChangelogFile: true
5-
- include:
6-
file: changes/02-create-refresh-tokens-table.yaml
7-
relativeToChangelogFile: true
8-
- include:
9-
file: changes/03-create-password-reset-tokens-table.yaml
10-
relativeToChangelogFile: true
11-
- include:
12-
file: changes/04-create-roles-table.yaml
13-
relativeToChangelogFile: true
14-
- include:
15-
file: changes/05-merge-token-tables.yaml
16-
relativeToChangelogFile: true
2+
- include:
3+
file: changes/01-create-users-table.yaml
4+
relativeToChangelogFile: true
5+
- include:
6+
file: changes/02-create-roles-table.yaml
7+
relativeToChangelogFile: true
8+
- include:
9+
file: changes/03-create-token-table.yaml
10+
relativeToChangelogFile: true
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package com.adsearch.architecture
2+
3+
import com.tngtech.archunit.base.DescribedPredicate
4+
import com.tngtech.archunit.core.domain.JavaClass
5+
import com.tngtech.archunit.core.domain.JavaClasses
6+
import com.tngtech.archunit.core.importer.ClassFileImporter
7+
import com.tngtech.archunit.core.importer.ImportOption
8+
import org.junit.jupiter.api.TestInstance
9+
10+
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
11+
abstract class AbstractArchTest {
12+
13+
protected val basePackage = "com.adsearch"
14+
protected val domainPackage = "$basePackage.domain"
15+
protected val applicationPackage = "$basePackage.application"
16+
protected val infrastructurePackage = "$basePackage.infrastructure"
17+
18+
protected val importedClasses: JavaClasses = ClassFileImporter()
19+
.withImportOption(ImportOption.DoNotIncludeTests())
20+
.importPackages(basePackage)
21+
.that(
22+
object : DescribedPredicate<JavaClass>("is not a Kotlin generated class") {
23+
override fun test(javaClass: JavaClass): Boolean {
24+
return !javaClass.fullName.contains("$") &&
25+
!javaClass.fullName.endsWith("Kt") &&
26+
!javaClass.simpleName.endsWith("Impl") &&
27+
javaClass.simpleName != "DefaultImpls"
28+
}
29+
}
30+
)
31+
}

backend/application/src/test/kotlin/com/adsearch/architecture/BaseArchitecture.kt

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)