gcx/backend/services/issuer-service/src/domain/entities/coupon-rule.entity.ts

12 lines
563 B
TypeScript

import { Entity, Column, PrimaryGeneratedColumn, CreateDateColumn } from 'typeorm';
@Entity('coupon_rules')
export class CouponRule {
@PrimaryGeneratedColumn('uuid') id: string;
@Column({ name: 'coupon_id', type: 'uuid' }) couponId: string;
@Column({ name: 'rule_type', type: 'varchar', length: 50 }) ruleType: string;
@Column({ name: 'rule_value', type: 'jsonb' }) ruleValue: Record<string, any>;
@Column({ type: 'text', nullable: true }) description: string | null;
@CreateDateColumn({ name: 'created_at', type: 'timestamptz' }) createdAt: Date;
}