Skip to content

Commit

Permalink
docs: 修改项目名称为 prune
Browse files Browse the repository at this point in the history
  • Loading branch information
kangood committed Feb 24, 2024
1 parent 795cc26 commit 9fde6f9
Show file tree
Hide file tree
Showing 18 changed files with 168 additions and 180 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ MYSQL_HOST=127.0.0.1
MYSQL_PORT=3306
MYSQL_USERNAME=root
MYSQL_PASSWORD=12345678
MYSQL_DATABASE=lamp
MYSQL_DATABASE=prune
# 阿里云密钥
ALI_ACCESS_KEY=
ALI_ACCESS_KEY_SECRET=
Expand Down
2 changes: 1 addition & 1 deletion generator.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 生成entity
npx typeorm-model-generator -h localhost -d lamp_generator -u root -x 123456 -e mysql -o .
npx typeorm-model-generator -h localhost -d prune -u root -x 123456 -e mysql -o .
# 生成controller、service、model
nest g resource entity_name
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{
"name": "lamp-nestjs",
"version": "0.0.1",
"description": "",
"author": "",
"name": "prune-api",
"version": "1.0.0",
"author": "KangodYan",
"private": true,
"license": "UNLICENSED",
"scripts": {
"build": "nest build",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
Expand Down
308 changes: 149 additions & 159 deletions lamp_none.sql → prune.sql

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/modules/org/entities/org.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { BaseEntity } from '@/modules/database/base';
@Tree('materialized-path')
@Index('uk_name', ['label'], { unique: true })
@Index('fu_path', ['mpath'], { fulltext: true })
@Entity('c_org', { schema: 'lamp_generator' })
@Entity('c_org')
export class OrgEntity extends BaseEntity {
@Type(() => OrgEntity)
@TreeParent({ onDelete: 'CASCADE' })
Expand Down
2 changes: 1 addition & 1 deletion src/modules/org/entities/role-authority.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ResourceEntity } from '@/modules/system/entities';
@Index('uk_role_authority', ['authorityId', 'authorityType', 'roleId'], {
unique: true,
})
@Entity('c_role_authority', { schema: 'lamp_nestjs' })
@Entity('c_role_authority')
export class RoleAuthorityEntity extends BaseEntity {
@Type()
resource: ResourceEntity;
Expand Down
2 changes: 1 addition & 1 deletion src/modules/org/entities/role.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { BaseEntity } from '@/modules/database/base';
import { RoleEchoDto } from '../dtos';

@Index('uk_code', ['code'], { unique: true })
@Entity('c_role', { schema: 'lamp_nestjs' })
@Entity('c_role')
export class RoleEntity extends BaseEntity {
@Type()
roleEchoDto: RoleEchoDto;
Expand Down
2 changes: 1 addition & 1 deletion src/modules/org/entities/station.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { BaseEntity } from '@/modules/database/base';
import { OrgEntity } from '@/modules/org/entities/org.entity';

@Index('uk_name', ['name'], { unique: true })
@Entity('c_station', { schema: 'lamp_generator' })
@Entity('c_station')
export class StationEntity extends BaseEntity {
@Column('varchar', {
name: 'name',
Expand Down
2 changes: 1 addition & 1 deletion src/modules/org/entities/user-role-relation.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { BaseEntity } from '@/modules/database/base';

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

@Entity('c_user_role', { schema: 'lamp_nestjs' })
@Entity('c_user_role')
export class UserRoleRelationEntity extends BaseEntity {
role: RoleEntity;
}
2 changes: 1 addition & 1 deletion src/modules/org/entities/user-role.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { BaseEntity } from '@/modules/database/base';
import { RoleEntity } from './role.entity';

@Index('uk_user_role', ['roleId', 'userId'], { unique: true })
@Entity('c_user_role', { schema: 'lamp_nestjs' })
@Entity('c_user_role')
export class UserRoleEntity extends BaseEntity {
@Type()
role: RoleEntity;
Expand Down
2 changes: 1 addition & 1 deletion src/modules/org/entities/user.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { RoleEntity } from './role.entity';
import { UserRoleEntity } from './user-role.entity';

@Index('uk_account', ['account'], { unique: true })
@Entity('c_user', { schema: 'lamp_generator' })
@Entity('c_user')
export class UserEntity extends BaseEntity {
@Type()
orgMap: OrgEntity;
Expand Down
2 changes: 1 addition & 1 deletion src/modules/resource/entities/ossc.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { BaseEntity } from '@/modules/database/base';

import { OsscEchoDto } from '../dtos';

@Entity('c_ossc', { schema: 'lamp' })
@Entity('c_ossc', { schema: 'prune' })
export class OsscEntity extends BaseEntity {
@Type()
osscEchoDto: OsscEchoDto;
Expand Down
2 changes: 1 addition & 1 deletion src/modules/restful/oss/oss-middleware.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class OSSMiddlewareService {
const mac = new qiniu.auth.digest.Mac(accessKey, secretKey);
const options = {
host: 'https://qiniu.panlore.top',
dir: 'project/tealamp/',
dir: 'project/prune/',
scope: 'kd-figure-bed',
expire: new Date().getTime() + 60 * 60 * 1000, // 和默认值一样,1个小时
};
Expand Down
2 changes: 1 addition & 1 deletion src/modules/system/entities/area.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { BaseEntity } from '@/modules/database/base';

@Tree('materialized-path')
@Index('uk_code', ['code'], { unique: true })
@Entity('c_area', { schema: 'lamp_generator' })
@Entity('c_area')
export class AreaEntity extends BaseEntity {
@Type(() => AreaEntity)
@TreeParent({ onDelete: 'CASCADE' })
Expand Down
2 changes: 1 addition & 1 deletion src/modules/system/entities/dictionary.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { BaseEntity } from '@/modules/database/base';

@Exclude()
@Index('uk_type_code', ['type', 'code'], { unique: true })
@Entity('c_dictionary', { schema: 'lamp_generator' })
@Entity('c_dictionary')
export class DictionaryEntity extends BaseEntity {
@Expose()
@Column('varchar', { name: 'type', comment: '类型', length: 255 })
Expand Down
2 changes: 1 addition & 1 deletion src/modules/system/entities/menu.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { BaseEntity } from '@/modules/database/base';

@Tree('materialized-path')
@Index('uk_path', ['path'], { unique: true })
@Entity('c_menu', { schema: 'lamp_nestjs' })
@Entity('c_menu')
export class MenuEntity extends BaseEntity {
@Type(() => MenuEntity)
@TreeParent({ onDelete: 'CASCADE' })
Expand Down
2 changes: 1 addition & 1 deletion src/modules/system/entities/parameter.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { BoolBitTransformer } from '@/modules/core/helpers/utils';
import { BaseEntity } from '@/modules/database/base';

@Index('uk_key', ['key'], { unique: true })
@Entity('c_parameter', { schema: 'lamp_generator' })
@Entity('c_parameter')
export class ParameterEntity extends BaseEntity {
@Column('varchar', {
name: 'key_',
Expand Down
2 changes: 1 addition & 1 deletion src/modules/system/entities/resource.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { BoolBitTransformer } from '@/modules/core/helpers';
import { BaseEntity } from '@/modules/database/base';

@Index('uk_code', ['code'], { unique: true })
@Entity('c_resource', { schema: 'lamp_nestjs' })
@Entity('c_resource')
export class ResourceEntity extends BaseEntity {
@Column('varchar', {
name: 'code',
Expand Down

0 comments on commit 9fde6f9

Please sign in to comment.