drilkmops
03/16/2022, 4:24 AMid,
slug,
params,
players:users(id, publicAddress, name)
Needle
03/16/2022, 4:24 AM/title
command!
We have solved your problem?
Click the button below to archive it.drilkmops
03/16/2022, 4:30 AMplayers: {
/**
* Format: uuid
* @description Note:
* This is a Primary Key.<pk/>
* This is a Foreign Key to `users.id`.<fk table='users' column='id'/>
*/
player_id: string;
/**
* Format: uuid
* @description Note:
* This is a Primary Key.<pk/>
* This is a Foreign Key to `rooms.id`.<fk table='rooms' column='id'/>
*/
room_id: string;
};
rooms: {
/**
* Format: uuid
* @description Note:
* This is a Primary Key.<pk/>
* @default extensions.uuid_generate_v4()
*/
id: string;
/**
* Format: timestamp with time zone
* @default now()
*/
created_at?: string;
/** Format: text */
slug: string;
/** Format: jsonb */
params?: string;
/** Format: uuid */
created_by?: string;
};
users: {
/**
* Format: character varying
* @description Note:
* This is a Primary Key.<pk/>
*/
publicAddress: string;
/**
* Format: timestamp with time zone
* @default now()
*/
created_at?: string;
/** Format: character varying */
nonce: string;
/**
* Format: uuid
* @default extensions.uuid_generate_v4()
*/
id?: string;
/** Format: text */
name?: string;
};
lawrencecchen
03/16/2022, 4:32 AMts
type MyUnionType = definitions["players"] & definitions["users"]
and passing that as a genericNeedle
03/16/2022, 4:32 AMlawrencecchen
03/16/2022, 4:33 AMdrilkmops
03/16/2022, 4:38 AM[]
doesnt work it doesn't look like
type myUnionType = {
players?: definitions["players"][]
} & definitions["rooms"]
drilkmops
03/16/2022, 4:44 AMNeedle
03/21/2022, 10:08 PM