파일 정리

This commit is contained in:
2025-12-24 22:50:13 +09:00
parent 05d89fdfcd
commit 2877a474eb
22 changed files with 1274 additions and 646 deletions

View 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';
}>;
}

View File

@@ -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',

View File

@@ -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 {