import { Column, Entity, PrimaryGeneratedColumn, Unique } from 'typeorm'
import { BigNumber } from 'bignumber.js'
import { DecimalTransformer } from '../../transformers/decimal.transformer'

@Entity()
export class CommissionConfig {
    @PrimaryGeneratedColumn()
    id: number

    @Column({ unique: true })
    level: number

    @Column({ type: 'decimal', precision: 19, scale: 6, transformer: new DecimalTransformer(), nullable: false })
    ratio: BigNumber
}
