@aopslabs/xf-bm
v0.2.1
Published
Base classes and type helpers for validated, locale-aware business models in TypeScript applications.
Readme
@aopslabs/xf-bm
Base classes and type helpers for validated, locale-aware business models in TypeScript applications.
Install
npm install @aopslabs/xf-bm zodUsage
import { z } from 'zod';
import { BmBase, type Ibm } from '@aopslabs/xf-bm';
interface Profile extends Ibm {
email: string;
}
class ProfileModel extends BmBase<Profile, Record<string, never>> {
protected buildSchemas() {
return {
create: z.object({ email: z.string().email() })
};
}
}The package includes common model fields, schema utilities, multilingual-field helpers, translated metadata, and structured validation results.
License
PolyForm Strict License 1.0.0. See LICENSE and NOTICE.
