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