chore: removed column.ts leftover
This commit is contained in:
parent
3193bdd720
commit
81c0aec202
@ -1,36 +0,0 @@
|
|||||||
export enum ColumnType {
|
|
||||||
string = 'string',
|
|
||||||
number = 'number'
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ColumnInterface {
|
|
||||||
id: number | undefined
|
|
||||||
name: string | undefined
|
|
||||||
type: ColumnType | undefined
|
|
||||||
length: number | undefined
|
|
||||||
}
|
|
||||||
|
|
||||||
export class Column implements ColumnInterface {
|
|
||||||
public id: number | undefined
|
|
||||||
public name: string | undefined
|
|
||||||
public type: ColumnType | undefined
|
|
||||||
public length: number | undefined
|
|
||||||
public static fromPlainObject(obj: object) {
|
|
||||||
return Object.assign(new Column(), obj)
|
|
||||||
}
|
|
||||||
|
|
||||||
constructor(id?: number, name?: string, type?: ColumnType, length?: number) {
|
|
||||||
this.id = id
|
|
||||||
this.name = name
|
|
||||||
this.type = type
|
|
||||||
this.length = length
|
|
||||||
}
|
|
||||||
|
|
||||||
get hsType() {
|
|
||||||
return (
|
|
||||||
(this.type === ColumnType.string && 'text') ||
|
|
||||||
(this.type === ColumnType.number && 'numeric') ||
|
|
||||||
null
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user