mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
17 lines
426 B
TypeScript
17 lines
426 B
TypeScript
|
import {BaseEntity, Column, Entity, JoinColumn, ManyToOne, PrimaryColumn} from "typeorm";
|
||
|
import {Document} from "./Document";
|
||
|
|
||
|
@Entity({name: 'secrets'})
|
||
|
export class Secret extends BaseEntity {
|
||
|
@PrimaryColumn()
|
||
|
public id: string; // generally a UUID
|
||
|
|
||
|
@Column({name: 'value'})
|
||
|
public value: string;
|
||
|
|
||
|
@ManyToOne(_type => Document, { onDelete: 'CASCADE' })
|
||
|
@JoinColumn({name: 'doc_id'})
|
||
|
public doc: Document;
|
||
|
|
||
|
}
|