diff --git a/apps/api/src/modules/system/dict/dict.entity.ts b/apps/api/src/modules/system/dict/dict.entity.ts index 9fcc95e..dcec672 100644 --- a/apps/api/src/modules/system/dict/dict.entity.ts +++ b/apps/api/src/modules/system/dict/dict.entity.ts @@ -1,14 +1,10 @@ import { ApiProperty } from '@nestjs/swagger' -import { PrimaryGeneratedColumn, Column, Entity } from 'typeorm' +import { Column, Entity } from 'typeorm' import { AbstractEntity } from '@/common/entity/abstract.entity' @Entity({ name: 'sys_config' }) export class DictEntity extends AbstractEntity { - @PrimaryGeneratedColumn() - @ApiProperty() - id: number - @Column({ type: 'varchar', length: 50 }) @ApiProperty({ description: '配置名' }) name: string diff --git a/apps/api/src/modules/system/menu/menu.entity.ts b/apps/api/src/modules/system/menu/menu.entity.ts index 23f8f0f..f156196 100644 --- a/apps/api/src/modules/system/menu/menu.entity.ts +++ b/apps/api/src/modules/system/menu/menu.entity.ts @@ -1,4 +1,4 @@ -import { PrimaryGeneratedColumn, Column, Entity, ManyToMany } from 'typeorm' +import { Column, Entity, ManyToMany } from 'typeorm' import { AbstractEntity } from '@/common/entity/abstract.entity' @@ -6,9 +6,6 @@ import { RoleEntity } from '../role/role.entity' @Entity({ name: 'sys_menu' }) export class MenuEntity extends AbstractEntity { - @PrimaryGeneratedColumn() - id: number - @Column({ nullable: true }) parent: number diff --git a/apps/api/src/modules/system/role/role.entity.ts b/apps/api/src/modules/system/role/role.entity.ts index ec18a43..1bec14a 100644 --- a/apps/api/src/modules/system/role/role.entity.ts +++ b/apps/api/src/modules/system/role/role.entity.ts @@ -1,11 +1,5 @@ import { ApiProperty } from '@nestjs/swagger' -import { - PrimaryGeneratedColumn, - Column, - Entity, - JoinTable, - ManyToMany, -} from 'typeorm' +import { Column, Entity, JoinTable, ManyToMany } from 'typeorm' import { AbstractEntity } from '@/common/entity/abstract.entity' @@ -14,10 +8,6 @@ import { MenuEntity } from '../menu/menu.entity' @Entity({ name: 'sys_role' }) export class RoleEntity extends AbstractEntity { - @PrimaryGeneratedColumn() - @ApiProperty() - id: number - @Column({ length: 50, unique: true }) @ApiProperty({ description: '角色名' }) name: string diff --git a/apps/api/src/modules/system/task/task.entity.ts b/apps/api/src/modules/system/task/task.entity.ts index ebfeeeb..cec5337 100644 --- a/apps/api/src/modules/system/task/task.entity.ts +++ b/apps/api/src/modules/system/task/task.entity.ts @@ -1,14 +1,10 @@ import { ApiProperty } from '@nestjs/swagger' -import { PrimaryGeneratedColumn, Column, Entity } from 'typeorm' +import { Column, Entity } from 'typeorm' import { AbstractEntity } from '@/common/entity/abstract.entity' @Entity({ name: 'sys_task' }) export class TaskEntity extends AbstractEntity { - @PrimaryGeneratedColumn() - @ApiProperty() - id: number - @Column({ type: 'varchar', length: 50, unique: true }) @ApiProperty({ description: '任务名' }) name: string diff --git a/apps/api/src/modules/tools/storage/storage.entity.ts b/apps/api/src/modules/tools/storage/storage.entity.ts index a25cda2..22a8958 100644 --- a/apps/api/src/modules/tools/storage/storage.entity.ts +++ b/apps/api/src/modules/tools/storage/storage.entity.ts @@ -1,14 +1,10 @@ import { ApiProperty } from '@nestjs/swagger' -import { PrimaryGeneratedColumn, Column, Entity } from 'typeorm' +import { Column, Entity } from 'typeorm' import { AbstractEntity } from '@/common/entity/abstract.entity' @Entity({ name: 'tool_storage' }) export class Storage extends AbstractEntity { - @PrimaryGeneratedColumn() - @ApiProperty() - id: number - @Column({ type: 'varchar', length: 200, comment: '文件名' }) @ApiProperty({ description: '文件名' }) name: string diff --git a/apps/api/src/modules/user/entities/user.entity.ts b/apps/api/src/modules/user/entities/user.entity.ts index bc36c59..dbcf0b5 100644 --- a/apps/api/src/modules/user/entities/user.entity.ts +++ b/apps/api/src/modules/user/entities/user.entity.ts @@ -1,6 +1,5 @@ import { Exclude } from 'class-transformer' import { - PrimaryGeneratedColumn, Column, Entity, ManyToMany, @@ -19,9 +18,6 @@ import { RoleEntity } from '@/modules/system/role/role.entity' @Entity({ name: 'sys_user' }) export class UserEntity extends AbstractEntity { - @PrimaryGeneratedColumn() - id: number - @Column({ unique: true }) username: string diff --git a/apps/api/tsconfig.json b/apps/api/tsconfig.json index fd36b60..d8d350c 100644 --- a/apps/api/tsconfig.json +++ b/apps/api/tsconfig.json @@ -7,7 +7,7 @@ "experimentalDecorators": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, - "target": "ES2021", + "target": "ES2022", "sourceMap": true, "outDir": "./dist", "baseUrl": "./",