import { Entity, PrimaryGeneratedColumn, Column, UpdateDateColumn, Index } from 'typeorm';

@Entity('tetard_coins')
export class TetardCoin {
  @PrimaryGeneratedColumn('uuid')
  id: string;

  @Index()
  @Column({ name: 'user_id', type: 'varchar', length: 255, unique: true })
  userId: string;

  @Column({ type: 'int', default: 0 })
  balance: number;

  @UpdateDateColumn({ name: 'updated_at' })
  updatedAt: Date;
}
