Skip to content

Instantly share code, notes, and snippets.

@socar-dorma
Created Jun 8, 2021
Embed
What would you like to do?
생성된 codes.ts 파일
export interface Code {
id: number | string,
group: string,
name: string,
label: string,
message?: string,
deleted?: boolean,
}
export class EnumEntry {
values: Array<Code> = [];
}
// other codes...
class SettlementType extends EnumEntry {
AUTO: Code = {
id: 0,
group: 'SETTLEMENT_TYPE',
name: 'STLTP_AUTO',
label: '자동',
}
MANUAL: Code = {
id: 1,
group: 'SETTLEMENT_TYPE',
name: 'STLTP_MANUAL',
label: '수동',
}
values: Array<Code> = [
this.AUTO,
this.MANUAL,
];
}
// other codes...
export default {
// other codes...
settlementType: new SettlementType(),
// other codes...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment