1
0
mirror of https://github.com/hotomoe/hotomoe synced 2024-12-16 23:58:14 +09:00
hotomoe/packages/backend/src/models/entities/Relay.ts
2022-09-18 03:27:08 +09:00

20 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';
}