mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-08-26 06:09:41 +00:00
feat: add customer details to customer entity
This commit is contained in:
8
src/common/modules/neoleap/neoleap.module.ts
Normal file
8
src/common/modules/neoleap/neoleap.module.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
|
||||
@Module({
|
||||
imports: [],
|
||||
controllers: [],
|
||||
providers: [],
|
||||
})
|
||||
export class NeoLeapModule {}
|
0
src/common/modules/neoleap/services/index.ts
Normal file
0
src/common/modules/neoleap/services/index.ts
Normal file
6
src/common/modules/neoleap/services/neoleap.service.ts
Normal file
6
src/common/modules/neoleap/services/neoleap.service.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
@Injectable()
|
||||
export class NeoLeapService {
|
||||
createApplication() {}
|
||||
}
|
@ -75,6 +75,24 @@ export class Customer extends BaseEntity {
|
||||
@Column('varchar', { name: 'user_id' })
|
||||
userId!: string;
|
||||
|
||||
@Column('varchar', { name: 'country', length: 255, nullable: true })
|
||||
country!: string;
|
||||
|
||||
@Column('varchar', { name: 'region', length: 255, nullable: true })
|
||||
region!: string;
|
||||
|
||||
@Column('varchar', { name: 'city', length: 255, nullable: true })
|
||||
city!: string;
|
||||
|
||||
@Column('varchar', { name: 'neighborhood', length: 255, nullable: true })
|
||||
neighborhood!: string;
|
||||
|
||||
@Column('varchar', { name: 'street', length: 255, nullable: true })
|
||||
street!: string;
|
||||
|
||||
@Column('varchar', { name: 'building', length: 255, nullable: true })
|
||||
building!: string;
|
||||
|
||||
@Column('varchar', { name: 'profile_picture_id', nullable: true })
|
||||
profilePictureId!: string;
|
||||
|
||||
|
@ -0,0 +1,23 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
export class AddAddressFieldsToCustomers1747569536067 implements MigrationInterface {
|
||||
name = 'AddAddressFieldsToCustomers1747569536067';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "customers" ADD "country" character varying(255)`);
|
||||
await queryRunner.query(`ALTER TABLE "customers" ADD "region" character varying(255)`);
|
||||
await queryRunner.query(`ALTER TABLE "customers" ADD "city" character varying(255)`);
|
||||
await queryRunner.query(`ALTER TABLE "customers" ADD "neighborhood" character varying(255)`);
|
||||
await queryRunner.query(`ALTER TABLE "customers" ADD "street" character varying(255)`);
|
||||
await queryRunner.query(`ALTER TABLE "customers" ADD "building" character varying(255)`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "customers" DROP COLUMN "building"`);
|
||||
await queryRunner.query(`ALTER TABLE "customers" DROP COLUMN "street"`);
|
||||
await queryRunner.query(`ALTER TABLE "customers" DROP COLUMN "neighborhood"`);
|
||||
await queryRunner.query(`ALTER TABLE "customers" DROP COLUMN "city"`);
|
||||
await queryRunner.query(`ALTER TABLE "customers" DROP COLUMN "region"`);
|
||||
await queryRunner.query(`ALTER TABLE "customers" DROP COLUMN "country"`);
|
||||
}
|
||||
}
|
@ -24,3 +24,4 @@ export * from './1739954239949-add-civilid-to-customers-and-update-notifications
|
||||
export * from './1740045960580-create-user-registration-table';
|
||||
export * from './1741087742821-add-used-flag-to-otp-and-remove-constraints-from-customers';
|
||||
export * from './1742112997024-update-customer-table';
|
||||
export * from './1747569536067-add-address-fields-to-customers';
|
||||
|
Reference in New Issue
Block a user