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; @Column({ type: 'text', nullable: true }) description: string | null; @CreateDateColumn({ name: 'created_at', type: 'timestamptz' }) createdAt: Date; }