subscription
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
import {
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
Entity,
|
||||
JoinColumn,
|
||||
ManyToOne,
|
||||
PrimaryGeneratedColumn,
|
||||
UpdateDateColumn,
|
||||
} from 'typeorm';
|
||||
import { Salon } from '../../salons/entities/salon.entity';
|
||||
import { SmsPackage } from './sms-package.entity';
|
||||
|
||||
@Entity('salon_sms_purchases')
|
||||
export class SalonSmsPurchase {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
|
||||
@Column()
|
||||
salonId: string;
|
||||
|
||||
@ManyToOne(() => Salon, { onDelete: 'CASCADE' })
|
||||
@JoinColumn({ name: 'salonId' })
|
||||
salon: Salon;
|
||||
|
||||
@Column()
|
||||
packageId: string;
|
||||
|
||||
@ManyToOne(() => SmsPackage)
|
||||
@JoinColumn({ name: 'packageId' })
|
||||
smsPackage: SmsPackage;
|
||||
|
||||
@Column({ type: 'int' })
|
||||
smsCount: number;
|
||||
|
||||
@Column({ type: 'int' })
|
||||
smsRemaining: number;
|
||||
|
||||
@Column({ type: 'bigint' })
|
||||
pricePaid: string;
|
||||
|
||||
@CreateDateColumn()
|
||||
createdAt: Date;
|
||||
|
||||
@UpdateDateColumn()
|
||||
updatedAt: Date;
|
||||
}
|
||||
Reference in New Issue
Block a user