refactor: move into monorepo
This commit is contained in:
442
packages/shared/src/zero-schema.gen.ts
Normal file
442
packages/shared/src/zero-schema.gen.ts
Normal file
@@ -0,0 +1,442 @@
|
||||
/* eslint-disable */
|
||||
|
||||
// @ts-nocheck
|
||||
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
|
||||
// This file was automatically generated by drizzle-zero.
|
||||
// You should NOT make any changes in this file as it will be overwritten.
|
||||
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
|
||||
|
||||
import type { Row } from "@rocicorp/zero";
|
||||
import { createBuilder } from "@rocicorp/zero";
|
||||
import type { DrizzleToZeroSchema, ZeroCustomType } from "drizzle-zero";
|
||||
import type * as drizzleSchema from "./db/schema/public";
|
||||
|
||||
type ZeroSchema = DrizzleToZeroSchema<typeof drizzleSchema>;
|
||||
|
||||
/**
|
||||
* The Zero schema object.
|
||||
* This type is auto-generated from your Drizzle schema definition.
|
||||
*/
|
||||
export const schema = {
|
||||
tables: {
|
||||
balance: {
|
||||
name: "balance",
|
||||
columns: {
|
||||
id: {
|
||||
type: "string",
|
||||
optional: false,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"balance",
|
||||
"id"
|
||||
>,
|
||||
},
|
||||
user_id: {
|
||||
type: "string",
|
||||
optional: false,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"balance",
|
||||
"user_id"
|
||||
>,
|
||||
serverName: "userId",
|
||||
},
|
||||
plaid_id: {
|
||||
type: "string",
|
||||
optional: false,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"balance",
|
||||
"plaid_id"
|
||||
>,
|
||||
serverName: "plaidId",
|
||||
},
|
||||
avaliable: {
|
||||
type: "number",
|
||||
optional: false,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"balance",
|
||||
"avaliable"
|
||||
>,
|
||||
},
|
||||
current: {
|
||||
type: "number",
|
||||
optional: false,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"balance",
|
||||
"current"
|
||||
>,
|
||||
},
|
||||
name: {
|
||||
type: "string",
|
||||
optional: false,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"balance",
|
||||
"name"
|
||||
>,
|
||||
},
|
||||
createdAt: {
|
||||
type: "number",
|
||||
optional: true,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"balance",
|
||||
"createdAt"
|
||||
>,
|
||||
serverName: "created_at",
|
||||
},
|
||||
updatedAt: {
|
||||
type: "number",
|
||||
optional: true,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"balance",
|
||||
"updatedAt"
|
||||
>,
|
||||
serverName: "updated_at",
|
||||
},
|
||||
},
|
||||
primaryKey: ["id"],
|
||||
},
|
||||
plaidAccessTokens: {
|
||||
name: "plaidAccessTokens",
|
||||
columns: {
|
||||
id: {
|
||||
type: "string",
|
||||
optional: false,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"plaidAccessTokens",
|
||||
"id"
|
||||
>,
|
||||
},
|
||||
name: {
|
||||
type: "string",
|
||||
optional: false,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"plaidAccessTokens",
|
||||
"name"
|
||||
>,
|
||||
},
|
||||
logoUrl: {
|
||||
type: "string",
|
||||
optional: false,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"plaidAccessTokens",
|
||||
"logoUrl"
|
||||
>,
|
||||
},
|
||||
userId: {
|
||||
type: "string",
|
||||
optional: false,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"plaidAccessTokens",
|
||||
"userId"
|
||||
>,
|
||||
serverName: "user_id",
|
||||
},
|
||||
token: {
|
||||
type: "string",
|
||||
optional: false,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"plaidAccessTokens",
|
||||
"token"
|
||||
>,
|
||||
},
|
||||
createdAt: {
|
||||
type: "number",
|
||||
optional: true,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"plaidAccessTokens",
|
||||
"createdAt"
|
||||
>,
|
||||
serverName: "created_at",
|
||||
},
|
||||
},
|
||||
primaryKey: ["id"],
|
||||
serverName: "plaidAccessToken",
|
||||
},
|
||||
plaidLink: {
|
||||
name: "plaidLink",
|
||||
columns: {
|
||||
id: {
|
||||
type: "string",
|
||||
optional: false,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"plaidLink",
|
||||
"id"
|
||||
>,
|
||||
},
|
||||
user_id: {
|
||||
type: "string",
|
||||
optional: false,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"plaidLink",
|
||||
"user_id"
|
||||
>,
|
||||
},
|
||||
link: {
|
||||
type: "string",
|
||||
optional: false,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"plaidLink",
|
||||
"link"
|
||||
>,
|
||||
},
|
||||
token: {
|
||||
type: "string",
|
||||
optional: false,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"plaidLink",
|
||||
"token"
|
||||
>,
|
||||
},
|
||||
createdAt: {
|
||||
type: "number",
|
||||
optional: true,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"plaidLink",
|
||||
"createdAt"
|
||||
>,
|
||||
serverName: "created_at",
|
||||
},
|
||||
},
|
||||
primaryKey: ["id"],
|
||||
},
|
||||
transaction: {
|
||||
name: "transaction",
|
||||
columns: {
|
||||
id: {
|
||||
type: "string",
|
||||
optional: false,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"transaction",
|
||||
"id"
|
||||
>,
|
||||
},
|
||||
user_id: {
|
||||
type: "string",
|
||||
optional: false,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"transaction",
|
||||
"user_id"
|
||||
>,
|
||||
},
|
||||
plaid_id: {
|
||||
type: "string",
|
||||
optional: false,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"transaction",
|
||||
"plaid_id"
|
||||
>,
|
||||
},
|
||||
account_id: {
|
||||
type: "string",
|
||||
optional: false,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"transaction",
|
||||
"account_id"
|
||||
>,
|
||||
},
|
||||
name: {
|
||||
type: "string",
|
||||
optional: false,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"transaction",
|
||||
"name"
|
||||
>,
|
||||
},
|
||||
amount: {
|
||||
type: "number",
|
||||
optional: false,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"transaction",
|
||||
"amount"
|
||||
>,
|
||||
},
|
||||
datetime: {
|
||||
type: "number",
|
||||
optional: true,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"transaction",
|
||||
"datetime"
|
||||
>,
|
||||
},
|
||||
authorized_datetime: {
|
||||
type: "number",
|
||||
optional: true,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"transaction",
|
||||
"authorized_datetime"
|
||||
>,
|
||||
},
|
||||
json: {
|
||||
type: "string",
|
||||
optional: true,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"transaction",
|
||||
"json"
|
||||
>,
|
||||
},
|
||||
createdAt: {
|
||||
type: "number",
|
||||
optional: true,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"transaction",
|
||||
"createdAt"
|
||||
>,
|
||||
serverName: "created_at",
|
||||
},
|
||||
updatedAt: {
|
||||
type: "number",
|
||||
optional: true,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"transaction",
|
||||
"updatedAt"
|
||||
>,
|
||||
serverName: "updated_at",
|
||||
},
|
||||
},
|
||||
primaryKey: ["id"],
|
||||
},
|
||||
users: {
|
||||
name: "users",
|
||||
columns: {
|
||||
id: {
|
||||
type: "string",
|
||||
optional: false,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"users",
|
||||
"id"
|
||||
>,
|
||||
},
|
||||
name: {
|
||||
type: "string",
|
||||
optional: true,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"users",
|
||||
"name"
|
||||
>,
|
||||
},
|
||||
email: {
|
||||
type: "string",
|
||||
optional: false,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"users",
|
||||
"email"
|
||||
>,
|
||||
},
|
||||
emailVerified: {
|
||||
type: "boolean",
|
||||
optional: true,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"users",
|
||||
"emailVerified"
|
||||
>,
|
||||
serverName: "email_verified",
|
||||
},
|
||||
image: {
|
||||
type: "string",
|
||||
optional: true,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"users",
|
||||
"image"
|
||||
>,
|
||||
},
|
||||
createdAt: {
|
||||
type: "number",
|
||||
optional: true,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"users",
|
||||
"createdAt"
|
||||
>,
|
||||
serverName: "created_at",
|
||||
},
|
||||
updatedAt: {
|
||||
type: "number",
|
||||
optional: true,
|
||||
customType: null as unknown as ZeroCustomType<
|
||||
ZeroSchema,
|
||||
"users",
|
||||
"updatedAt"
|
||||
>,
|
||||
serverName: "updated_at",
|
||||
},
|
||||
},
|
||||
primaryKey: ["id"],
|
||||
serverName: "user",
|
||||
},
|
||||
},
|
||||
relationships: {},
|
||||
enableLegacyQueries: false,
|
||||
enableLegacyMutators: false,
|
||||
} as const;
|
||||
|
||||
/**
|
||||
* Represents the Zero schema type.
|
||||
* This type is auto-generated from your Drizzle schema definition.
|
||||
*/
|
||||
export type Schema = typeof schema;
|
||||
/**
|
||||
* Represents a row from the "balance" table.
|
||||
* This type is auto-generated from your Drizzle schema definition.
|
||||
*/
|
||||
export type Balance = Row<Schema["tables"]["balance"]>;
|
||||
/**
|
||||
* Represents a row from the "plaidAccessTokens" table.
|
||||
* This type is auto-generated from your Drizzle schema definition.
|
||||
*/
|
||||
export type PlaidAccessToken = Row<Schema["tables"]["plaidAccessTokens"]>;
|
||||
/**
|
||||
* Represents a row from the "plaidLink" table.
|
||||
* This type is auto-generated from your Drizzle schema definition.
|
||||
*/
|
||||
export type PlaidLink = Row<Schema["tables"]["plaidLink"]>;
|
||||
/**
|
||||
* Represents a row from the "transaction" table.
|
||||
* This type is auto-generated from your Drizzle schema definition.
|
||||
*/
|
||||
export type Transaction = Row<Schema["tables"]["transaction"]>;
|
||||
/**
|
||||
* Represents a row from the "users" table.
|
||||
* This type is auto-generated from your Drizzle schema definition.
|
||||
*/
|
||||
export type User = Row<Schema["tables"]["users"]>;
|
||||
|
||||
/**
|
||||
* Represents the Zero schema query builder.
|
||||
* This type is auto-generated from your Drizzle schema definition.
|
||||
*/
|
||||
export const builder = createBuilder(schema);
|
||||
Reference in New Issue
Block a user