Skip to content

Commit ac34129

Browse files
authored
Merge pull request #484 from plotwist-app/refactor/improve-backend-folder-structure
refactor: improve backend folder structure
2 parents 143a88a + c96009c commit ac34129

394 files changed

Lines changed: 280 additions & 270 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.

apps/backend/drizzle.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ if (!DATABASE_URL) {
77
}
88

99
export default {
10-
schema: 'src/db/schema/index.ts',
11-
out: 'src/db/migrations',
10+
schema: 'src/infra/db/schema/index.ts',
11+
out: 'src/infra/db/migrations',
1212
dialect: 'postgresql',
1313
dbCredentials: { url: DATABASE_URL },
1414
schemaFilter: ['auth', 'public'],

apps/backend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"dev": "tsx watch --env-file=.env src/main.ts",
88
"build": "dotenv -e .env -- tsup src/main.ts --out-dir dist --format esm,cjs --dts",
99
"start": "dotenv -e .env -- node dist/main.js",
10-
"db:seed": "tsx --env-file=.env src/db/seed.ts",
10+
"db:seed": "tsx --env-file=.env src/infra/db/seed.ts",
1111
"db:generate": "dotenv -e .env -- drizzle-kit generate",
1212
"db:migrate": "dotenv -e .env -- drizzle-kit migrate",
1313
"db:migrate:prod": "drizzle-kit migrate",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { importItemStatusEnum } from '@/db/schema'
1+
import type { importItemStatusEnum } from '@/infra/db/schema'
22

33
export type ImportStatusEnum =
44
(typeof importItemStatusEnum)['enumValues'][number]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import type { statusEnum } from '@/db/schema'
1+
import type { statusEnum } from '@/infra/db/schema'
22

33
export type UserItemStatus = (typeof statusEnum)['enumValues'][number]

apps/backend/src/@types/media-type-enum.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { mediaTypeEnum, providersEnum } from '@/db/schema'
1+
import type { mediaTypeEnum, providersEnum } from '@/infra/db/schema'
22

33
export type MediaTypeEnum = (typeof mediaTypeEnum)['enumValues'][number]
44

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import type { providersEnum } from '@/db/schema'
1+
import type { providersEnum } from '@/infra/db/schema'
22

33
export type ProvidersEnum = (typeof providersEnum)['enumValues'][number]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { InferInsertModel, InferSelectModel } from 'drizzle-orm'
2-
import type { schema } from '@/db/schema'
2+
import type { schema } from '@/infra/db/schema'
33

44
export type Feedback = InferSelectModel<typeof schema.feedbacks>
55
export type InsertFeedbackModel = InferInsertModel<typeof schema.feedbacks>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { InferInsertModel, InferSelectModel } from 'drizzle-orm'
2-
import type { schema } from '@/db/schema'
2+
import type { schema } from '@/infra/db/schema'
33

44
export type Follow = InferSelectModel<typeof schema.followers>
55
export type InsertFollow = InferInsertModel<typeof schema.followers>

apps/backend/src/domain/entities/import-movies.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { InferInsertModel, InferSelectModel } from 'drizzle-orm'
2-
import type { schema } from '@/db/schema'
2+
import type { schema } from '@/infra/db/schema'
33

44
export type ImportMovie = InferSelectModel<typeof schema.importMovies>
55

apps/backend/src/domain/entities/import-series.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { InferInsertModel, InferSelectModel } from 'drizzle-orm'
2-
import type { schema } from '@/db/schema'
2+
import type { schema } from '@/infra/db/schema'
33

44
export type ImportSeries = InferSelectModel<typeof schema.importSeries>
55

0 commit comments

Comments
 (0)