chore: payment
This commit is contained in:
+25
@@ -0,0 +1,25 @@
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user