708 B
708 B
Entities
Core domain models of the application — pure type definitions for business objects (User, Product, Message), their enums, and related constants. Stable, reusable, usable from any layer.
entities/
| --- user.ts # { id: string; name: string; email: string }
| --- product.ts # { id: string; name: string; price: number }
| --- enums.ts # { UserRole, ProductCategory }
Larger entities can use a folder (user/ with interfaces.ts, enums.ts, rules.ts, index.ts).
export type User = {
id: number;
name: string;
email: string;
};
export enum UserRole {
ADMIN = "admin",
SIMLPE_JACK = "simple_jack",
}