import { TABLE_NAME } from 'src/core/strings/constants/table.constants';
import { TaxEntity } from '../../domain/entities/tax.entity';
import { Column, Entity } from 'typeorm';
import { BaseStatusModel } from 'src/core/modules/data/model/base-status.model';

@Entity(TABLE_NAME.TAX)
export class TaxModel extends BaseStatusModel<TaxEntity> implements TaxEntity {
  @Column('varchar', { name: 'name' })
  name: string;

  @Column('float', { name: 'value', default: 0 })
  value: number;

  @Column('json', { name: 'formula_render', nullable: true })
  formula_render: any;

  @Column('varchar', { name: 'formula_string', nullable: true })
  formula_string: string;
}
