Skip to content

Instantly share code, notes, and snippets.

@socar-dorma
Created June 8, 2021 05:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save socar-dorma/a0f2c79be7ffc2cff556c02be80500f0 to your computer and use it in GitHub Desktop.
Save socar-dorma/a0f2c79be7ffc2cff556c02be80500f0 to your computer and use it in GitHub Desktop.
생성된 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