Drizzle/tests/Invoice.ts

19 lines
529 B
TypeScript

import {s} from "@sharkitek/core";
import {drizzle} from "../src";
import {database} from "./database";
import {invoices} from "./schema/invoices";
/**
* Invoice model class example with Sharkitek and its Drizzle connector.
* @see https://code.zeptotech.net/Sharkitek/Core
*/
export class Invoice extends s.model({
id: s.property.numeric(),
date: s.property.date(),
amount: s.property.decimal(),
clientName: s.property.string(),
clientAddress: s.property.string(),
}, "id").extends(drizzle(database, invoices, {
}))
{
}