update entity id
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Entity, ManyToOne, Property, Enum, Index, PrimaryKey } from '@mikro-orm/core';
|
||||
import { Entity, ManyToOne, Property, Enum, Index, PrimaryKey, OptionalProps } from '@mikro-orm/core';
|
||||
import { BaseEntity } from '../../../common/entities/base.entity';
|
||||
import { Order } from '../../order/entities/order.entity';
|
||||
import { PaymentGatewayEnum, PaymentMethodEnum, PaymentStatusEnum } from '../interface/payment';
|
||||
@@ -7,6 +7,8 @@ import { Admin } from 'src/modules/admin/entities/admin.entity';
|
||||
|
||||
@Entity({ tableName: 'payments' })
|
||||
export class Payment extends BaseEntity {
|
||||
[OptionalProps]?: 'createdAt' | 'deletedAt'
|
||||
|
||||
@PrimaryKey({ type: 'string', columnType: 'char(26)' })
|
||||
id: string = ulid()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user