파일 정리
This commit is contained in:
20
backend/src/mpt/dto/mpt-statistics.dto.ts
Normal file
20
backend/src/mpt/dto/mpt-statistics.dto.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* MPT 통계 응답 DTO
|
||||
*/
|
||||
export interface MptStatisticsDto {
|
||||
totalMptCows: number;
|
||||
latestTestDate: Date | null;
|
||||
categories: {
|
||||
energy: { safe: number; caution: number };
|
||||
protein: { safe: number; caution: number };
|
||||
liver: { safe: number; caution: number };
|
||||
mineral: { safe: number; caution: number };
|
||||
};
|
||||
riskyCows: Array<{
|
||||
cowId: string;
|
||||
category: string;
|
||||
itemName: string;
|
||||
value: number;
|
||||
status: 'high' | 'low';
|
||||
}>;
|
||||
}
|
||||
@@ -3,6 +3,7 @@ import { FarmModel } from 'src/farm/entities/farm.entity';
|
||||
import {
|
||||
Column,
|
||||
Entity,
|
||||
Index,
|
||||
JoinColumn,
|
||||
ManyToOne,
|
||||
PrimaryGeneratedColumn,
|
||||
@@ -20,6 +21,7 @@ export class MptModel extends BaseModel {
|
||||
})
|
||||
pkMptNo: number;
|
||||
|
||||
@Index('idx_mpt_cow_id')
|
||||
@Column({
|
||||
name: 'cow_id',
|
||||
type: 'varchar',
|
||||
@@ -38,6 +40,7 @@ export class MptModel extends BaseModel {
|
||||
})
|
||||
cowShortNo: string;
|
||||
|
||||
@Index('idx_mpt_fk_farm_no')
|
||||
@Column({
|
||||
name: 'fk_farm_no',
|
||||
type: 'int',
|
||||
|
||||
@@ -8,27 +8,7 @@ import {
|
||||
MptReferenceRange,
|
||||
MptCategory,
|
||||
} from '../common/const/MptReference';
|
||||
|
||||
/**
|
||||
* MPT 통계 응답 DTO
|
||||
*/
|
||||
export interface MptStatisticsDto {
|
||||
totalMptCows: number;
|
||||
latestTestDate: Date | null;
|
||||
categories: {
|
||||
energy: { safe: number; caution: number };
|
||||
protein: { safe: number; caution: number };
|
||||
liver: { safe: number; caution: number };
|
||||
mineral: { safe: number; caution: number };
|
||||
};
|
||||
riskyCows: Array<{
|
||||
cowId: string;
|
||||
category: string;
|
||||
itemName: string;
|
||||
value: number;
|
||||
status: 'high' | 'low';
|
||||
}>;
|
||||
}
|
||||
import { MptStatisticsDto } from './dto/mpt-statistics.dto';
|
||||
|
||||
@Injectable()
|
||||
export class MptService {
|
||||
|
||||
Reference in New Issue
Block a user