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

/**
 * 每日站点汇总
 */
@Entity('t_report_daily_department')
@Unique('uk_date_department', ['date', 'departmentId']) // 💡 部门表的复合唯一约束
export class ReportDailyDepartmentEntity extends BaseEntity {
  @Index()
  @Column({ comment: '日期', type: 'date' })
  date: string;

  @Index()
  @Column({ comment: '部门ID' })
  departmentId: number;

  @Index()
  @Column({ comment: '部门名称' })
  departmentName: string;

  @Column({ comment: '总重量', type: 'decimal', precision: 15, scale: 2, default: 0.00 })
  weightTotal: number;

  @Column({ comment: 'sw60重量', type: 'decimal', precision: 15, scale: 2, default: 0.00 })
  weightSw60: number;

  @Column({ comment: 'sw61重量', type: 'decimal', precision: 15, scale: 2, default: 0.00 })
  weightSw61: number;

  @Column({ comment: 'sw62重量', type: 'decimal', precision: 15, scale: 2, default: 0.00 })
  weightSw62: number;

  @Column({ comment: 'sw63重量', type: 'decimal', precision: 15, scale: 2, default: 0.00 })
  weightSw63: number;

  @Column({ comment: 'sw64重量', type: 'decimal', precision: 15, scale: 2, default: 0.00 })
  weightSw64: number;

  @Column({ comment: 'sw62_001重量', type: 'decimal', precision: 15, scale: 2, default: 0.00 })
  weightSw62001: number;

  @Column({ comment: 'sw62_002重量', type: 'decimal', precision: 15, scale: 2, default: 0.00 })
  weightSw62002: number;

  @Column({ comment: 'sw62_003重量', type: 'decimal', precision: 15, scale: 2, default: 0.00 })
  weightSw62003: number;

  @Column({ comment: 'sw62_004重量', type: 'decimal', precision: 15, scale: 2, default: 0.00 })
  weightSw62004: number;

  @Column({ comment: 'sw62_005重量', type: 'decimal', precision: 15, scale: 2, default: 0.00 })
  weightSw62005: number;

  @Column({ comment: 'sw62_006重量', type: 'decimal', precision: 15, scale: 2, default: 0.00 })
  weightSw62006: number;

  @Column({ comment: 'sw62_007重量', type: 'decimal', precision: 15, scale: 2, default: 0.00 })
  weightSw62007: number;

  @Column({ comment: '总称重次数', type: 'decimal', precision: 10, scale: 2, default: 0.00 })
  timeTotal: number;

  @Column({ comment: 'sw60次数', type: 'decimal', precision: 10, scale: 2, default: 0.00 })
  timeSw60: number;

  @Column({ comment: 'sw61次数', type: 'decimal', precision: 10, scale: 2, default: 0.00 })
  timeSw61: number;

  @Column({ comment: 'sw62次数', type: 'decimal', precision: 10, scale: 2, default: 0.00 })
  timeSw62: number;

  @Column({ comment: 'sw63次数', type: 'decimal', precision: 10, scale: 2, default: 0.00 })
  timeSw63: number;

  @Column({ comment: 'sw64次数', type: 'decimal', precision: 10, scale: 2, default: 0.00 })
  timeSw64: number;

  @Column({ comment: 'sw62001次数', type: 'decimal', precision: 10, scale: 2, default: 0.00 })
  timeSw62001: number;

  @Column({ comment: 'sw62002次数', type: 'decimal', precision: 10, scale: 2, default: 0.00 })
  timeSw62002: number;

  @Column({ comment: 'sw62003次数', type: 'decimal', precision: 10, scale: 2, default: 0.00 })
  timeSw62003: number;

  @Column({ comment: 'sw62004次数', type: 'decimal', precision: 10, scale: 2, default: 0.00 })
  timeSw62004: number;

  @Column({ comment: 'sw62005次数', type: 'decimal', precision: 10, scale: 2, default: 0.00 })
  timeSw62005: number;

  @Column({ comment: 'sw62006次数', type: 'decimal', precision: 10, scale: 2, default: 0.00 })
  timeSw62006: number;

  @Column({ comment: 'sw62007次数', type: 'decimal', precision: 10, scale: 2, default: 0.00 })
  timeSw62007: number;

  @Column({ comment: '总碳排量', type: 'decimal', precision: 15, scale: 2, default: 0.0 })
  carbonTotal: number;

  @Column({ comment: 'sw60碳排量', type: 'decimal', precision: 15, scale: 2, default: 0.0 })
  carbonSw60: number;

  @Column({ comment: 'sw61碳排量', type: 'decimal', precision: 15, scale: 2, default: 0.0 })
  carbonSw61: number;

  @Column({ comment: 'sw62碳排量', type: 'decimal', precision: 15, scale: 2, default: 0.0 })
  carbonSw62: number;

  @Column({ comment: 'sw63碳排量', type: 'decimal', precision: 15, scale: 2, default: 0.0 })
  carbonSw63: number;

  @Column({ comment: 'sw64碳排量', type: 'decimal', precision: 15, scale: 2, default: 0.0 })
  carbonSw64: number;

  @Column({ comment: 'sw62001碳排量', type: 'decimal', precision: 15, scale: 2, default: 0.0 })
  carbonSw62001: number;

  @Column({ comment: 'sw62002碳排量', type: 'decimal', precision: 15, scale: 2, default: 0.0 })
  carbonSw62002: number;

  @Column({ comment: 'sw62003碳排量', type: 'decimal', precision: 15, scale: 2, default: 0.0 })
  carbonSw62003: number;

  @Column({ comment: 'sw62004碳排量', type: 'decimal', precision: 15, scale: 2, default: 0.0 })
  carbonSw62004: number;

  @Column({ comment: 'sw62005碳排量', type: 'decimal', precision: 15, scale: 2, default: 0.0 })
  carbonSw62005: number;

  @Column({ comment: 'sw62006碳排量', type: 'decimal', precision: 15, scale: 2, default: 0.0 })
  carbonSw62006: number;

  @Column({ comment: 'sw62007碳排量', type: 'decimal', precision: 15, scale: 2, default: 0.0 })
  carbonSw62007: number;

  @Column({ comment: 'sw62估算销售额', type: 'decimal', precision: 15, scale: 2, default: 0.00 })
  estimatedSalesSw62: number;

  @Column({ comment: 'sw62_001估算销售额', type: 'decimal', precision: 15, scale: 2, default: 0.00 })
  estimatedSalesSw62001: number;

  @Column({ comment: 'sw62_002估算销售额', type: 'decimal', precision: 15, scale: 2, default: 0.00 })
  estimatedSalesSw62002: number;

  @Column({ comment: 'sw62_003估算销售额', type: 'decimal', precision: 15, scale: 2, default: 0.00 })
  estimatedSalesSw62003: number;

  @Column({ comment: 'sw62_004估算销售额', type: 'decimal', precision: 15, scale: 2, default: 0.00 })
  estimatedSalesSw62004: number;

  @Column({ comment: 'sw62_005估算销售额', type: 'decimal', precision: 15, scale: 2, default: 0.00 })
  estimatedSalesSw62005: number;

  @Column({ comment: 'sw62_006估算销售额', type: 'decimal', precision: 15, scale: 2, default: 0.00 })
  estimatedSalesSw62006: number;

  @Column({ comment: 'sw62_007估算销售额', type: 'decimal', precision: 15, scale: 2, default: 0.00 })
  estimatedSalesSw62007: number;

}