26 lines
391 B
TypeScript
26 lines
391 B
TypeScript
import {
|
|
Entity,
|
|
PrimaryColumn,
|
|
Column,
|
|
Index
|
|
} from 'typeorm';
|
|
|
|
@Entity('device_tokens')
|
|
@Index('idx_device_tokens_user_id', ['userId'])
|
|
export class DeviceTokenEntity {
|
|
@PrimaryColumn('text')
|
|
id!: string;
|
|
|
|
@Column('text')
|
|
userId!: string;
|
|
|
|
@Column('text')
|
|
platform!: 'ios' | 'android';
|
|
|
|
@Column('text')
|
|
token!: string;
|
|
|
|
@Column('integer')
|
|
updatedAt!: number;
|
|
}
|