UNPKG

@phyng/typeschema

Version:

A database schema definition library using TypeScript or JSON

22 lines (20 loc) 275 B
const Db = (tables) => { return { type: "db", tables }; }; const Table = (name, fields) => { return { name, fields }; }; const Field = (name, type, options = {}) => { return { type, name, ...options }; }; export { Db, Field, Table };