Move software files one directory up, Readme
This commit is contained in:
17
backend/models/locations/city.model.ts
Normal file
17
backend/models/locations/city.model.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { Column, HasMany, Model, Table } from "sequelize-typescript";
|
||||
import { Location } from "./location.model";
|
||||
|
||||
@Table({ timestamps: false })
|
||||
export class City extends Model {
|
||||
@Column
|
||||
name: string
|
||||
|
||||
@Column
|
||||
country: string
|
||||
|
||||
|
||||
// Relations
|
||||
|
||||
@HasMany(() => Location)
|
||||
locations: Location[]
|
||||
}
|
||||
Reference in New Issue
Block a user