From 6fb60e0afc9fb11da06f6bf404f255d8cfee3def Mon Sep 17 00:00:00 2001 From: Janaina <jsk22@inf.ufpr.br> Date: Wed, 26 Mar 2025 11:26:17 -0300 Subject: [PATCH] Issue #61/Comparing-SQL-Schemas --- src/db/relations/collection-like.relation.ts | 2 +- src/db/relations/resource-subject.relation.ts | 2 +- src/db/repo/achievement.repo.ts | 4 ++-- src/db/repo/action.repo.ts | 4 ++-- src/db/repo/collection-likes.repo.ts | 4 ++-- src/db/repo/collection-resources.repo.ts | 4 ++-- src/db/repo/collections.repo.ts | 4 ++-- src/db/repo/resource-subjects.repo.ts | 4 ++-- src/db/repo/role.repo.ts | 4 ++-- src/db/repo/subjects.repo.ts | 4 ++-- src/db/repo/user-achievements.repo.ts | 2 +- src/db/repo/user-collection.repo.ts | 4 ++-- .../{achievement.schema.ts => achievements.schema.ts} | 0 src/db/schema/{action.schema.ts => actions.schema.ts} | 0 .../{collection.schema.ts => collections.schema.ts} | 0 src/db/schema/comments.schema.ts | 2 +- src/db/schema/complaint.schema.ts | 2 +- src/db/schema/index.ts | 10 +++++----- src/db/schema/item.schema.ts | 2 +- src/db/schema/{role.schema.ts => roles.schema.ts} | 0 .../schema/{subject.schema.ts => subjects.schema.ts} | 3 --- src/db/seeds/achievement.seed.ts | 2 +- src/db/seeds/action.seed.ts | 2 +- src/db/seeds/collections.seed.ts | 4 ++-- src/db/seeds/role.seed.ts | 2 +- src/db/seeds/subjects.seed.ts | 4 ++-- src/routes/achievement.route.ts | 2 +- src/routes/action.route.ts | 2 +- src/routes/collections.route.ts | 2 +- src/routes/role.route.ts | 2 +- src/routes/subjects.route.ts | 2 +- src/routes/user-role.route.ts | 2 +- src/services/achievement.service.ts | 2 +- src/services/action.service.ts | 2 +- src/services/collection-likes.service.ts | 2 +- src/services/collection-resources.service.ts | 2 +- src/services/collections.service.ts | 2 +- src/services/resource-subjects.service.ts | 2 +- src/services/role.service.ts | 2 +- src/services/subjects.service.ts | 2 +- src/services/user-achievements.service.ts | 2 +- src/services/user-collection.service.ts | 2 +- 42 files changed, 52 insertions(+), 55 deletions(-) rename src/db/schema/{achievement.schema.ts => achievements.schema.ts} (100%) rename src/db/schema/{action.schema.ts => actions.schema.ts} (100%) rename src/db/schema/{collection.schema.ts => collections.schema.ts} (100%) rename src/db/schema/{role.schema.ts => roles.schema.ts} (100%) rename src/db/schema/{subject.schema.ts => subjects.schema.ts} (99%) diff --git a/src/db/relations/collection-like.relation.ts b/src/db/relations/collection-like.relation.ts index 6c91985..0fa5a24 100644 --- a/src/db/relations/collection-like.relation.ts +++ b/src/db/relations/collection-like.relation.ts @@ -1,6 +1,6 @@ import { integer, pgTable, serial } from "drizzle-orm/pg-core"; import userTable from "../schema/user.schema"; -import collectionTable from "../schema/collection.schema"; +import collectionTable from "../schema/collections.schema"; import { createInsertSchema, createSelectSchema } from "drizzle-zod"; import type { z } from "zod"; import { relations } from "drizzle-orm"; diff --git a/src/db/relations/resource-subject.relation.ts b/src/db/relations/resource-subject.relation.ts index 8d97f3c..7ea04b4 100644 --- a/src/db/relations/resource-subject.relation.ts +++ b/src/db/relations/resource-subject.relation.ts @@ -1,6 +1,6 @@ import { integer, pgTable, serial } from "drizzle-orm/pg-core"; import resourceTable from "../schema/resource.schema"; -import subjectsTable from "../schema/subject.schema"; +import subjectsTable from "../schema/subjects.schema"; import { createInsertSchema, createSelectSchema } from "drizzle-zod"; import type { z } from "zod"; import { relations } from "drizzle-orm"; diff --git a/src/db/repo/achievement.repo.ts b/src/db/repo/achievement.repo.ts index 749ba76..4e70070 100644 --- a/src/db/repo/achievement.repo.ts +++ b/src/db/repo/achievement.repo.ts @@ -1,7 +1,7 @@ import { Service } from "typedi"; -import type { AchievementInput, AchievementModel, AchievementUpdate } from "../schema/achievement.schema"; +import type { AchievementInput, AchievementModel, AchievementUpdate } from "../schema/achievements.schema"; import db from ".."; -import achievementTable, { achievementSchemas } from "../schema/achievement.schema"; +import achievementTable, { achievementSchemas } from "../schema/achievements.schema"; import { eq } from "drizzle-orm"; @Service() diff --git a/src/db/repo/action.repo.ts b/src/db/repo/action.repo.ts index 75f8e16..f6071dd 100644 --- a/src/db/repo/action.repo.ts +++ b/src/db/repo/action.repo.ts @@ -1,7 +1,7 @@ import { Service } from "typedi"; -import type { ActionInput, ActionModel, ActionUpdate } from "../schema/action.schema"; +import type { ActionInput, ActionModel, ActionUpdate } from "../schema/actions.schema"; import db from ".."; -import actionTable, { actionSchemas } from "../schema/action.schema"; +import actionTable, { actionSchemas } from "../schema/actions.schema"; import { eq } from "drizzle-orm"; import { z } from "zod"; diff --git a/src/db/repo/collection-likes.repo.ts b/src/db/repo/collection-likes.repo.ts index e23bc4e..8063c07 100644 --- a/src/db/repo/collection-likes.repo.ts +++ b/src/db/repo/collection-likes.repo.ts @@ -1,11 +1,11 @@ import { Service } from "typedi"; -import type { CollectionModel } from "../schema/collection.schema"; +import type { CollectionModel } from "../schema/collections.schema"; import type { UserModel } from "../schema/user.schema"; import db from ".."; import collectionLikesTable from "../relations/collection-like.relation"; import { and, eq, inArray } from "drizzle-orm"; import userTable from "../schema/user.schema"; -import collectionTable from "../schema/collection.schema"; +import collectionTable from "../schema/collections.schema"; @Service() export class collectionLikesRepo { diff --git a/src/db/repo/collection-resources.repo.ts b/src/db/repo/collection-resources.repo.ts index b2471a0..225227f 100644 --- a/src/db/repo/collection-resources.repo.ts +++ b/src/db/repo/collection-resources.repo.ts @@ -1,11 +1,11 @@ import { Service } from "typedi"; -import type { CollectionModel } from "../schema/collection.schema"; +import type { CollectionModel } from "../schema/collections.schema"; import type { ResourceModel } from "../schema/resource.schema"; import db from ".."; import collectionResourcesTable from "../relations/collection-resource.relation"; import { and, eq, inArray, name } from "drizzle-orm"; import resourceTable from "../schema/resource.schema"; -import collectionTable from "../schema/collection.schema"; +import collectionTable from "../schema/collections.schema"; @Service() export class collectionResourcesRepo { diff --git a/src/db/repo/collections.repo.ts b/src/db/repo/collections.repo.ts index 44d1d67..eae48a3 100644 --- a/src/db/repo/collections.repo.ts +++ b/src/db/repo/collections.repo.ts @@ -3,9 +3,9 @@ import type { CollectionInput, CollectionModel, CollectionUpdate, -} from '../schema/collection.schema' +} from '../schema/collections.schema' import db from ".."; -import collectionTable, { collectionSchemas } from "../schema/collection.schema"; +import collectionTable, { collectionSchemas } from "../schema/collections.schema"; import { and, eq, isNull } from 'drizzle-orm' import type { ResourceModel } from "../schema/resource.schema"; import fs from 'fs'; diff --git a/src/db/repo/resource-subjects.repo.ts b/src/db/repo/resource-subjects.repo.ts index 5108f39..31ae26d 100644 --- a/src/db/repo/resource-subjects.repo.ts +++ b/src/db/repo/resource-subjects.repo.ts @@ -3,8 +3,8 @@ import db from ".."; import resourceSubjectsTable from "../relations/resource-subject.relation"; import { and, eq, inArray } from "drizzle-orm"; import type { ResourceModel } from "../schema/resource.schema"; -import type { SubjectModel } from "../schema/subject.schema"; -import subjectsTable from "../schema/subject.schema"; +import type { SubjectModel } from "../schema/subjects.schema"; +import subjectsTable from "../schema/subjects.schema"; import resourceTable from "../schema/resource.schema"; diff --git a/src/db/repo/role.repo.ts b/src/db/repo/role.repo.ts index 8b8b89d..a5c5af3 100644 --- a/src/db/repo/role.repo.ts +++ b/src/db/repo/role.repo.ts @@ -1,7 +1,7 @@ import { Service } from "typedi"; -import type { RoleInput, RoleModel, RoleUpdate } from "../schema/role.schema"; +import type { RoleInput, RoleModel, RoleUpdate } from "../schema/roles.schema"; import db from ".."; -import roleTable, { roleSchemas } from "../schema/role.schema"; +import roleTable, { roleSchemas } from "../schema/roles.schema"; import { eq } from "drizzle-orm"; import { z } from "zod"; diff --git a/src/db/repo/subjects.repo.ts b/src/db/repo/subjects.repo.ts index 16b32c9..1ad4087 100644 --- a/src/db/repo/subjects.repo.ts +++ b/src/db/repo/subjects.repo.ts @@ -1,7 +1,7 @@ import { Service } from "typedi"; -import {type SubjectInput, type SubjectModel, type SubjectUpdate} from "../schema/subject.schema"; +import {type SubjectInput, type SubjectModel, type SubjectUpdate} from "../schema/subjects.schema"; import db from ".."; -import subjectsTable, { subjectSchema } from "../schema/subject.schema"; +import subjectsTable, { subjectSchema } from "../schema/subjects.schema"; import { eq } from "drizzle-orm"; @Service() diff --git a/src/db/repo/user-achievements.repo.ts b/src/db/repo/user-achievements.repo.ts index 06f63cb..b9057c2 100644 --- a/src/db/repo/user-achievements.repo.ts +++ b/src/db/repo/user-achievements.repo.ts @@ -3,7 +3,7 @@ import type { UserModel } from "../schema/user.schema"; import db from ".."; import { achievementTable, userAchievementsTable, userTable } from "../schema"; import { and, eq, inArray } from "drizzle-orm"; -import type { AchievementModel } from "../schema/achievement.schema"; +import type { AchievementModel } from "../schema/achievements.schema"; @Service() export class userAchievementsRepo { diff --git a/src/db/repo/user-collection.repo.ts b/src/db/repo/user-collection.repo.ts index bf68f0a..636da33 100644 --- a/src/db/repo/user-collection.repo.ts +++ b/src/db/repo/user-collection.repo.ts @@ -1,10 +1,10 @@ import { Service } from "typedi"; import type { UserModel } from "../schema/user.schema"; -import type { CollectionModel } from "../schema/collection.schema"; +import type { CollectionModel } from "../schema/collections.schema"; import db from ".."; import userCollectionTable from "../relations/user-collection.relation"; import { and, eq, inArray } from "drizzle-orm"; -import collectionTable from "../schema/collection.schema"; +import collectionTable from "../schema/collections.schema"; import userTable from "../schema/user.schema"; @Service() diff --git a/src/db/schema/achievement.schema.ts b/src/db/schema/achievements.schema.ts similarity index 100% rename from src/db/schema/achievement.schema.ts rename to src/db/schema/achievements.schema.ts diff --git a/src/db/schema/action.schema.ts b/src/db/schema/actions.schema.ts similarity index 100% rename from src/db/schema/action.schema.ts rename to src/db/schema/actions.schema.ts diff --git a/src/db/schema/collection.schema.ts b/src/db/schema/collections.schema.ts similarity index 100% rename from src/db/schema/collection.schema.ts rename to src/db/schema/collections.schema.ts diff --git a/src/db/schema/comments.schema.ts b/src/db/schema/comments.schema.ts index 5068179..c03981d 100644 --- a/src/db/schema/comments.schema.ts +++ b/src/db/schema/comments.schema.ts @@ -12,7 +12,7 @@ const commentsTable = pgTable('comments', { text: text('text').notNull(), created_at: timestamp('created_at', {mode:'string'}).notNull().defaultNow(), deleted_at: timestamp('deleted_at',{mode:'string'}), - update_at: timestamp('update_at', {mode:'string'}).notNull().defaultNow().$onUpdate(() => sql`current_timestamp`) + updated_at: timestamp('updated_at', {mode:'string'}).notNull().defaultNow().$onUpdate(() => sql`current_timestamp`) } ) diff --git a/src/db/schema/complaint.schema.ts b/src/db/schema/complaint.schema.ts index 0d6d2e0..d447a64 100644 --- a/src/db/schema/complaint.schema.ts +++ b/src/db/schema/complaint.schema.ts @@ -3,7 +3,7 @@ import userTable from "./user.schema"; import { createInsertSchema, createSelectSchema } from "drizzle-zod"; import type { z } from "zod"; import resourceTable from "./resource.schema"; -import collectionTable from "./collection.schema"; +import collectionTable from "./collections.schema"; import stateEnum from "./stateEnum.schema"; const complaintTable = pgTable('complaints', { diff --git a/src/db/schema/index.ts b/src/db/schema/index.ts index 7975332..afcfe60 100644 --- a/src/db/schema/index.ts +++ b/src/db/schema/index.ts @@ -1,8 +1,8 @@ import resourceTable from './resource.schema' import resourceStatsTable from './resource-stats.schema' import collectionStatsTable from './collection-stats.schema' -import collectionTable from './collection.schema' -import subjectsTable from './subject.schema' +import collectionTable from './collections.schema' +import subjectsTable from './subjects.schema' import submissionTable from './submission.schema' import licenseTable from './license.schema' import languageTable from './language.schema' @@ -12,10 +12,10 @@ import userTable from './user.schema' import objectTypeTable from './object-type.schema' import complaintTable from './complaint.schema' import resourceSubjectsTable from '../relations/resource-subject.relation' -import achievementTable from './achievement.schema' +import achievementTable from './achievements.schema' import resourceLanguagesTable from '../relations/resource-language.relation' import followRelationTable from '../relations/followers.relation' -import roleTable from './role.schema' +import roleTable from './roles.schema' import collectionLikesTable from '../relations/collection-like.relation' import userRoleRelationTable from '../relations/user-role.relation' import collectionResourcesTable from '../relations/collection-resource.relation' @@ -25,7 +25,7 @@ import resourceLikesTable from '../relations/resource-like.relation' import resourceEducationalStagesTable from '../relations/resource-educational-stage.relation' import itemsTable from './item.schema' import userAchievementsTable from '../relations/user-achievement.relation' -import actionTable from './action.schema' +import actionTable from './actions.schema' import notificationRelationTable from '../relations/notification.relation' import userItemRelationTable from '../relations/user-item.relation' import stateEnum from './stateEnum.schema' diff --git a/src/db/schema/item.schema.ts b/src/db/schema/item.schema.ts index 97b277c..5075696 100644 --- a/src/db/schema/item.schema.ts +++ b/src/db/schema/item.schema.ts @@ -1,6 +1,6 @@ import { boolean, serial, text, timestamp, varchar } from "drizzle-orm/pg-core"; import { integer, numeric, pgTable } from "drizzle-orm/pg-core"; -import achievementTable from "./achievement.schema"; +import achievementTable from "./achievements.schema"; import { createInsertSchema, createSelectSchema } from "drizzle-zod"; import type { z } from "zod"; import { sql } from "drizzle-orm"; diff --git a/src/db/schema/role.schema.ts b/src/db/schema/roles.schema.ts similarity index 100% rename from src/db/schema/role.schema.ts rename to src/db/schema/roles.schema.ts diff --git a/src/db/schema/subject.schema.ts b/src/db/schema/subjects.schema.ts similarity index 99% rename from src/db/schema/subject.schema.ts rename to src/db/schema/subjects.schema.ts index ae5f499..217effd 100644 --- a/src/db/schema/subject.schema.ts +++ b/src/db/schema/subjects.schema.ts @@ -6,9 +6,6 @@ import { import { createInsertSchema, createSelectSchema } from 'drizzle-zod' import type { z } from 'zod' - - - const subjectsTable = pgTable('subjects', { id: serial('id').primaryKey() .unique() diff --git a/src/db/seeds/achievement.seed.ts b/src/db/seeds/achievement.seed.ts index bfb0da5..4dd2ec0 100644 --- a/src/db/seeds/achievement.seed.ts +++ b/src/db/seeds/achievement.seed.ts @@ -1,6 +1,6 @@ import type db from ".."; import { achievementTable } from "../schema"; -import type { AchievementInput } from "../schema/achievement.schema"; +import type { AchievementInput } from "../schema/achievements.schema"; export default async function seed(db: db) { await db.insert(achievementTable).values(achievementData) diff --git a/src/db/seeds/action.seed.ts b/src/db/seeds/action.seed.ts index 1ff0631..097e8e8 100644 --- a/src/db/seeds/action.seed.ts +++ b/src/db/seeds/action.seed.ts @@ -1,5 +1,5 @@ import type db from "@/db"; -import actionTable, { type ActionInput } from "../schema/action.schema"; +import actionTable, { type ActionInput } from "../schema/actions.schema"; export default async function seed(db: db) { await db.insert(actionTable).values(actionsData) diff --git a/src/db/seeds/collections.seed.ts b/src/db/seeds/collections.seed.ts index 0447040..c7f96bf 100644 --- a/src/db/seeds/collections.seed.ts +++ b/src/db/seeds/collections.seed.ts @@ -1,6 +1,6 @@ import type db from '..' -import type { CollectionInput } from '../schema/collection.schema' -import collectionTable from '../schema/collection.schema' +import type { CollectionInput } from '../schema/collections.schema' +import collectionTable from '../schema/collections.schema' export default async function seed(db:db) { await db.insert(collectionTable).values(collectionData) diff --git a/src/db/seeds/role.seed.ts b/src/db/seeds/role.seed.ts index 7db7573..e615ef8 100644 --- a/src/db/seeds/role.seed.ts +++ b/src/db/seeds/role.seed.ts @@ -1,5 +1,5 @@ import type db from "@/db"; -import roleTable, { type RoleInput } from "../schema/role.schema"; +import roleTable, { type RoleInput } from "../schema/roles.schema"; export default async function seed(db: db) { await db.insert(roleTable).values(rolesData) diff --git a/src/db/seeds/subjects.seed.ts b/src/db/seeds/subjects.seed.ts index 5e8e102..80a1ffd 100644 --- a/src/db/seeds/subjects.seed.ts +++ b/src/db/seeds/subjects.seed.ts @@ -1,6 +1,6 @@ import type db from ".."; -import type { SubjectInput } from "../schema/subject.schema"; -import subjectsTable from "../schema/subject.schema"; +import type { SubjectInput } from "../schema/subjects.schema"; +import subjectsTable from "../schema/subjects.schema"; export default async function seed(db:db) { await db.insert(subjectsTable).values(subjectsData) diff --git a/src/routes/achievement.route.ts b/src/routes/achievement.route.ts index 57180c4..fad3cf0 100644 --- a/src/routes/achievement.route.ts +++ b/src/routes/achievement.route.ts @@ -2,7 +2,7 @@ import { AchievementService } from "@/services/achievement.service"; import Container from "typedi"; import { honoWithJwt } from ".."; import { zValidator } from "@hono/zod-validator"; -import { achievementSchemas } from "@/db/schema/achievement.schema"; +import { achievementSchemas } from "@/db/schema/achievements.schema"; import { createApexError, HttpStatus } from "@/services/error.service"; import { Hono } from "hono"; diff --git a/src/routes/action.route.ts b/src/routes/action.route.ts index bc8582f..eb219c1 100644 --- a/src/routes/action.route.ts +++ b/src/routes/action.route.ts @@ -2,7 +2,7 @@ import { ActionService } from "@/services/action.service" import Container from "typedi" import { honoWithJwt } from ".." import { zValidator } from "@hono/zod-validator" -import { actionSchemas } from "@/db/schema/action.schema" +import { actionSchemas } from "@/db/schema/actions.schema" import { createApexError, HttpStatus } from "@/services/error.service" import { z } from "zod" diff --git a/src/routes/collections.route.ts b/src/routes/collections.route.ts index 9ae45c7..c413eb6 100644 --- a/src/routes/collections.route.ts +++ b/src/routes/collections.route.ts @@ -2,7 +2,7 @@ import { CollectionsService } from "@/services/collections.service"; import Container from "typedi"; import { honoWithJwt } from ".."; import { zValidator } from "@hono/zod-validator"; -import { collectionSchemas } from "@/db/schema/collection.schema"; +import { collectionSchemas } from "@/db/schema/collections.schema"; import { createApexError, HttpStatus } from "@/services/error.service"; import { Hono } from "hono"; import { collectionStatsSchemas } from "@/db/schema/collection-stats.schema"; diff --git a/src/routes/role.route.ts b/src/routes/role.route.ts index 7d7195c..7c1a892 100644 --- a/src/routes/role.route.ts +++ b/src/routes/role.route.ts @@ -2,7 +2,7 @@ import { RoleService } from "@/services/role.service" import Container from "typedi" import { honoWithJwt } from ".." import { zValidator } from "@hono/zod-validator" -import { roleSchemas } from "@/db/schema/role.schema" +import { roleSchemas } from "@/db/schema/roles.schema" import { createApexError, HttpStatus } from "@/services/error.service" import { z } from "zod" diff --git a/src/routes/subjects.route.ts b/src/routes/subjects.route.ts index d739604..ff981a9 100644 --- a/src/routes/subjects.route.ts +++ b/src/routes/subjects.route.ts @@ -2,7 +2,7 @@ import { SubjectsService } from "@/services/subjects.service"; import { createApexError, HttpStatus } from "@/services/error.service"; import Container from "typedi"; import { honoWithJwt } from ".."; -import { subjectSchema } from "@/db/schema/subject.schema"; +import { subjectSchema } from "@/db/schema/subjects.schema"; import { Hono } from "hono"; import { zValidator } from "@hono/zod-validator"; diff --git a/src/routes/user-role.route.ts b/src/routes/user-role.route.ts index c2caaf8..8bf7437 100644 --- a/src/routes/user-role.route.ts +++ b/src/routes/user-role.route.ts @@ -8,7 +8,7 @@ import { z } from "zod"; import { UserService } from "@/services/user.service"; import { userSchemas, type UserProfile } from "@/db/schema/user.schema"; import { RoleService } from "@/services/role.service"; -import { roleSchemas, type RoleModel } from "@/db/schema/role.schema"; +import { roleSchemas, type RoleModel } from "@/db/schema/roles.schema"; const service = Container.get(UserRoleRelationService) const userService = Container.get(UserService) diff --git a/src/services/achievement.service.ts b/src/services/achievement.service.ts index f5abce8..fb28f62 100644 --- a/src/services/achievement.service.ts +++ b/src/services/achievement.service.ts @@ -1,5 +1,5 @@ import { AchievementRepo } from "@/db/repo/achievement.repo"; -import type { AchievementInput, AchievementModel, AchievementUpdate } from "@/db/schema/achievement.schema"; +import type { AchievementInput, AchievementModel, AchievementUpdate } from "@/db/schema/achievements.schema"; import { Inject, Service } from "typedi"; @Service() diff --git a/src/services/action.service.ts b/src/services/action.service.ts index abb012c..a873433 100644 --- a/src/services/action.service.ts +++ b/src/services/action.service.ts @@ -1,6 +1,6 @@ import type db from "@/db" import { ActionRepo } from "@/db/repo/action.repo" -import type { ActionModel, ActionInput, ActionUpdate } from "@/db/schema/action.schema" +import type { ActionModel, ActionInput, ActionUpdate } from "@/db/schema/actions.schema" import { Inject, Service } from "typedi" @Service() diff --git a/src/services/collection-likes.service.ts b/src/services/collection-likes.service.ts index 658360b..1300be1 100644 --- a/src/services/collection-likes.service.ts +++ b/src/services/collection-likes.service.ts @@ -1,5 +1,5 @@ import { collectionLikesRepo } from "@/db/repo/collection-likes.repo"; -import type { CollectionModel } from "@/db/schema/collection.schema"; +import type { CollectionModel } from "@/db/schema/collections.schema"; import type { UserModel } from "@/db/schema/user.schema"; import { Inject, Service } from "typedi"; diff --git a/src/services/collection-resources.service.ts b/src/services/collection-resources.service.ts index 4d0b984..8da5647 100644 --- a/src/services/collection-resources.service.ts +++ b/src/services/collection-resources.service.ts @@ -1,5 +1,5 @@ import { collectionResourcesRepo } from "@/db/repo/collection-resources.repo"; -import type { CollectionModel } from "@/db/schema/collection.schema"; +import type { CollectionModel } from "@/db/schema/collections.schema"; import type { ResourceModel } from "@/db/schema/resource.schema"; import { Inject, Service } from "typedi"; diff --git a/src/services/collections.service.ts b/src/services/collections.service.ts index 8bfeae9..c843d03 100644 --- a/src/services/collections.service.ts +++ b/src/services/collections.service.ts @@ -4,7 +4,7 @@ import type { CollectionInput, CollectionModel, CollectionUpdate -} from '@/db/schema/collection.schema' +} from '@/db/schema/collections.schema' @Service() export class CollectionsService { diff --git a/src/services/resource-subjects.service.ts b/src/services/resource-subjects.service.ts index 8157f92..72306d5 100644 --- a/src/services/resource-subjects.service.ts +++ b/src/services/resource-subjects.service.ts @@ -1,6 +1,6 @@ import { resourceSubjects } from "@/db/repo/resource-subjects.repo"; import type { ResourceModel } from "@/db/schema/resource.schema"; -import type { SubjectModel } from "@/db/schema/subject.schema"; +import type { SubjectModel } from "@/db/schema/subjects.schema"; import { Inject, Service } from "typedi"; diff --git a/src/services/role.service.ts b/src/services/role.service.ts index 1c606af..025c31d 100644 --- a/src/services/role.service.ts +++ b/src/services/role.service.ts @@ -1,6 +1,6 @@ import type db from "@/db" import { RoleRepo } from "@/db/repo/role.repo" -import type { RoleModel, RoleInput, RoleUpdate } from "@/db/schema/role.schema" +import type { RoleModel, RoleInput, RoleUpdate } from "@/db/schema/roles.schema" import { Inject, Service } from "typedi" @Service() diff --git a/src/services/subjects.service.ts b/src/services/subjects.service.ts index 8bbb445..d8b2f0c 100644 --- a/src/services/subjects.service.ts +++ b/src/services/subjects.service.ts @@ -1,5 +1,5 @@ import { subjectsRepo } from "@/db/repo/subjects.repo"; -import type { SubjectInput, SubjectModel, SubjectUpdate } from "@/db/schema/subject.schema"; +import type { SubjectInput, SubjectModel, SubjectUpdate } from "@/db/schema/subjects.schema"; import { Inject, Service } from "typedi"; diff --git a/src/services/user-achievements.service.ts b/src/services/user-achievements.service.ts index ad2b9f6..c94c632 100644 --- a/src/services/user-achievements.service.ts +++ b/src/services/user-achievements.service.ts @@ -1,5 +1,5 @@ import { userAchievementsRepo } from "@/db/repo/user-achievements.repo"; -import type { AchievementModel } from "@/db/schema/achievement.schema"; +import type { AchievementModel } from "@/db/schema/achievements.schema"; import type { UserModel } from "@/db/schema/user.schema"; import { Inject, Service } from "typedi"; diff --git a/src/services/user-collection.service.ts b/src/services/user-collection.service.ts index 99cad76..8c8de31 100644 --- a/src/services/user-collection.service.ts +++ b/src/services/user-collection.service.ts @@ -1,5 +1,5 @@ import { userCollectionsRepo } from "@/db/repo/user-collection.repo"; -import type { CollectionModel } from "@/db/schema/collection.schema"; +import type { CollectionModel } from "@/db/schema/collections.schema"; import type { UserModel } from "@/db/schema/user.schema"; import { Inject, Service } from "typedi"; -- GitLab