1
0
mirror of https://github.com/hotomoe/hotomoe synced 2024-12-14 22:58:14 +09:00
hotomoe/packages/backend/src/models/Relay.ts
2024-02-13 15:59:27 +00:00

25 lines
524 B
TypeScript

/*
* 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';
}