mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-15 00:33:09 +02:00
19 lines
407 B
TypeScript
19 lines
407 B
TypeScript
import { PrimaryColumn, Entity, Index, Column } from 'typeorm';
|
|
import { id } from '../id.js';
|
|
|
|
@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';
|
|
}
|