26 lines
863 B
TypeScript
Executable File
26 lines
863 B
TypeScript
Executable File
import { Entity, EntityRepositoryType, Enum, Opt, Property } from "@mikro-orm/core";
|
|
|
|
import { BaseEntity } from "../../../common/entities/base.entity";
|
|
import { GatewayEnum } from "../enums/gateway.enum";
|
|
import { PaymentGatewaysRepository } from "../repositories/payment-gateway.repository";
|
|
|
|
@Entity({ repository: () => PaymentGatewaysRepository })
|
|
export class PaymentGateway extends BaseEntity {
|
|
@Enum({ items: () => GatewayEnum, nullable: false, unique: true })
|
|
name!: GatewayEnum;
|
|
|
|
@Property({ type: "varchar", length: 150, nullable: false })
|
|
nameFa!: string;
|
|
|
|
@Property({ type: "varchar", length: 150, nullable: false })
|
|
logoUrl!: string;
|
|
|
|
@Property({ type: "boolean", default: true })
|
|
isActive: boolean & Opt;
|
|
|
|
@Property({ type: "text", nullable: true })
|
|
description?: string;
|
|
|
|
[EntityRepositoryType]?: PaymentGatewaysRepository;
|
|
}
|