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

/**
 * 垃圾回收订单详情信息
 */
@Entity('t_recycle_order_item')
export class RecycleOrderItemEntity extends BaseEntity {
    @Index()
    @Column({ comment: '订单NO' })
    orderNo: string;

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

    @Column({ comment: '垃圾分类名称' })
    itemName: string;

    @Column({ comment: '固废国标分类' })
    category: string;

    @Column({ comment: '重量', type: 'decimal', precision: 10, scale: 2, default: 0, })
    weight: number;

    @Column({ comment: '单价', type: 'decimal', precision: 10, scale: 2, default: 0, })
    unitPrice: number;

    @Column({ comment: '金额', type: 'decimal', precision: 10, scale: 2, default: 0, })
    amount: number;

    @Column({ comment: '碳积分', type: 'decimal', precision: 10, scale: 2, default: 0, })
    carbonPoint: number;
}