Skip to content

Commit

Permalink
build: modify target to ES2022
Browse files Browse the repository at this point in the history
  • Loading branch information
kuizuo committed Nov 11, 2023
1 parent 370c79c commit 5283bc0
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 35 deletions.
6 changes: 1 addition & 5 deletions apps/api/src/modules/system/dict/dict.entity.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 1 addition & 4 deletions apps/api/src/modules/system/menu/menu.entity.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import { PrimaryGeneratedColumn, Column, Entity, ManyToMany } from 'typeorm'
import { Column, Entity, ManyToMany } from 'typeorm'

import { AbstractEntity } from '@/common/entity/abstract.entity'

import { RoleEntity } from '../role/role.entity'

@Entity({ name: 'sys_menu' })
export class MenuEntity extends AbstractEntity {
@PrimaryGeneratedColumn()
id: number

@Column({ nullable: true })
parent: number

Expand Down
12 changes: 1 addition & 11 deletions apps/api/src/modules/system/role/role.entity.ts
Original file line number Diff line number Diff line change
@@ -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'

Expand All @@ -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
Expand Down
6 changes: 1 addition & 5 deletions apps/api/src/modules/system/task/task.entity.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 1 addition & 5 deletions apps/api/src/modules/tools/storage/storage.entity.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 0 additions & 4 deletions apps/api/src/modules/user/entities/user.entity.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Exclude } from 'class-transformer'
import {
PrimaryGeneratedColumn,
Column,
Entity,
ManyToMany,
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion apps/api/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"experimentalDecorators": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"target": "ES2021",
"target": "ES2022",
"sourceMap": true,
"outDir": "./dist",
"baseUrl": "./",
Expand Down

0 comments on commit 5283bc0

Please sign in to comment.