Initial commit
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import { EntitySchema } from 'typeorm'
|
||||
|
||||
export type ClassEntity = {
|
||||
id: string
|
||||
name: string
|
||||
type: string
|
||||
familyPhoto: string | null
|
||||
}
|
||||
|
||||
export const ClassEntitySchema = new EntitySchema<ClassEntity>({
|
||||
name: 'ClassEntity',
|
||||
tableName: 'classes',
|
||||
columns: {
|
||||
id: {
|
||||
type: String,
|
||||
primary: true
|
||||
},
|
||||
name: {
|
||||
type: String
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: 'cheap'
|
||||
},
|
||||
familyPhoto: {
|
||||
name: 'family_photo',
|
||||
type: String,
|
||||
nullable: true
|
||||
}
|
||||
},
|
||||
relations: {}
|
||||
})
|
||||
Reference in New Issue
Block a user