mirror of
https://github.com/pieartsy/PluralFlux.git
synced 2026-04-16 17:45:28 +10:00
added system model and migration
This commit is contained in:
47
database/entity/System.ts
Normal file
47
database/entity/System.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
import {Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, Unique} from "typeorm"
|
||||
|
||||
@Entity({name: "System", synchronize: true})
|
||||
@Unique("UQ_System_userid", ['userid'])
|
||||
@Unique("UQ_System_shortid", ['shortid'])
|
||||
export class System {
|
||||
|
||||
@PrimaryGeneratedColumn()
|
||||
id: number
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
})
|
||||
shortid: string
|
||||
|
||||
@Column()
|
||||
userid: string
|
||||
|
||||
@Column({
|
||||
length: 100,
|
||||
nullable: true
|
||||
})
|
||||
name: string
|
||||
|
||||
@Column({
|
||||
type: "varchar",
|
||||
nullable: true,
|
||||
length: 100
|
||||
})
|
||||
fronter: string
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
})
|
||||
grouptag: string
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
})
|
||||
autoproxy: string
|
||||
|
||||
@CreateDateColumn({ type: 'timestamptz' })
|
||||
createdAt: Date
|
||||
|
||||
@UpdateDateColumn({ type: 'timestamptz' })
|
||||
updatedAt: Date
|
||||
}
|
||||
Reference in New Issue
Block a user