We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
model:
import { BaseEntity, Column, CreateDateColumn, Entity, Index, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm'; import type {Insertable, Selectable, Updateable} from 'kysely'; import {AccountEntity} from '../account'; import {InboxEntity} from "../inbox"; import type {Generated, NonAttribute} from 'kysely-typeorm'; export interface ChannelApiTable { id: Generated<number>; account_id: number; identifier: string; hmac_token: string; hmac_mandatory: boolean; webhook_url: string | null; additional_attributes: Record<string, any> | null; created_at: Date; updated_at: Date; } export type ChannelApi = Selectable<ChannelApiTable>; export type NewChannelApi = Insertable<ChannelApiTable>; export type ChannelApiUpdate = Updateable<ChannelApiTable>; @Entity('channel_api') @Index(['hmac_token'], {unique: true}) @Index(['identifier'], {unique: true}) export class ChannelApiEntity extends BaseEntity { @PrimaryGeneratedColumn() id: Generated<number>; @ManyToOne(() => AccountEntity) account: NonAttribute<AccountEntity>; @Column() account_id: number; @Column() identifier: string; @Column() hmac_token: string; @Column({default: false}) hmac_mandatory: boolean; @Column({nullable: true}) webhook_url: string; @Column({type: 'jsonb', nullable: true}) additional_attributes: Record<string, any>; @ManyToOne(() => InboxEntity) inbox: NonAttribute<InboxEntity>; @CreateDateColumn() created_at: Date; @UpdateDateColumn() updated_at: Date; }
If in database definition I use manuallly created interface:
interface Database { // ... channel_api: Entities.ChannelApiTable; }
Then everything works fine and types are ok. But If I use:
interface Database { // ... channel_api: KyselifyEntity<Entities.ChannelApiEntity>; }
Then channel_api's type has no prop additional_attributes
channel_api
additional_attributes
The text was updated successfully, but these errors were encountered:
Hey 👋
Thanks for raising this! 🙏
Sorry, something went wrong.
No branches or pull requests
model:
If in database definition I use manuallly created interface:
Then everything works fine and types are ok. But If I use:
Then
channel_api
's type has no propadditional_attributes
The text was updated successfully, but these errors were encountered: