summaryrefslogtreecommitdiff
path: root/packages/backend/src/models/Relay.ts
blob: eca29160328890b5e5abc6d3588d8691b5a6671f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
 * SPDX-FileCopyrightText: syuilo and misskey-project
 * SPDX-License-Identifier: AGPL-3.0-only
 */

import { PrimaryColumn, Entity, Index, Column } from 'typeorm';
import { id } from './util/id.js';

@Entity('relay')
export class MiRelay {
	@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';
}