mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-23 15:49:10 +00:00
38 lines
497 B
TypeScript
38 lines
497 B
TypeScript
import { Column, Entity, Index } from 'typeorm';
|
|
import BaseModel from './BaseModel';
|
|
import Project from './Project';
|
|
|
|
export enum CustomFieldType {
|
|
Text = 'text',
|
|
Number = 'number'
|
|
}
|
|
|
|
@Entity({
|
|
name: "CustomField"
|
|
})
|
|
export default class CustomField extends BaseModel {
|
|
|
|
@Column()
|
|
fieldName!: string;
|
|
|
|
@Column()
|
|
fieldType!: CustomFieldType;
|
|
|
|
@Column()
|
|
project!: Project;
|
|
|
|
@Column()
|
|
uniqueField!: boolean;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|