2020-05-10 11:42:31 +02:00
|
|
|
import { PrimaryColumn, Entity, Index, Column } from 'typeorm';
|
2021-08-19 14:55:45 +02:00
|
|
|
import { id } from '../id';
|
2020-05-10 11:42:31 +02:00
|
|
|
|
|
|
|
@Entity()
|
|
|
|
export class Relay {
|
|
|
|
@PrimaryColumn(id())
|
|
|
|
public id: string;
|
|
|
|
|
|
|
|
@Index({ unique: true })
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 512, nullable: false,
|
|
|
|
})
|
|
|
|
public inbox: string;
|
|
|
|
|
|
|
|
@Column('enum', {
|
|
|
|
enum: ['requesting', 'accepted', 'rejected'],
|
|
|
|
})
|
|
|
|
public status: 'requesting' | 'accepted' | 'rejected';
|
|
|
|
}
|