import { BaseEntity } from '../../base/entity/base';
import { Column, Entity, Index } from 'typeorm';

/**
 * 回收物品信息
 */
@Entity('t_recycle_item')
export class RecycleItemEntity extends BaseEntity {

  @Index()
  @Column({ comment: '所属单位' })
  departmentId: string;

  departmentName: string;

  @Column({ comment: '分类ID' })
  itemId: string;

  @Index()
  @Column({ comment: '名称' })
  itemName: string;

  @Index()
  @Column({ comment: '包含品类' })
  including: string;

  @Column({ comment: '单位' })
  unit: string;

  @Column({
    comment: '价格',
    type: 'decimal',
    precision: 10,
    scale: 2,
  })
  price: number;

  @Column({ comment: '碳积分' })
  carbonPoint: number;

  @Index()
  @Column({ comment: '废品类别编码' })
  category: string;

  @Column({ comment: '状态', dict: ['启用', '禁用'], default: 0 })
  status: number;
  
}