import { DB_SCHEMA } from 'src/utils';
import { Column, Entity, Index, PrimaryGeneratedColumn } from 'typeorm';

@Index('user_id', ['user_id'], {})
@Entity('user_authorizations', { schema: DB_SCHEMA })
export class UserAuthorizationsEntity {
  @PrimaryGeneratedColumn({ type: 'int', name: 'id' })
  id: number;

  @Column('smallint', { name: 'user_id' })
  user_id: number;

  @Column('text', { name: 'token', nullable: true })
  token: string | null;
}
