21 lines
358 B
TypeScript
21 lines
358 B
TypeScript
import { Entity, PrimaryGeneratedColumn, Column, ManyToOne } from 'typeorm';
|
|
import { User } from './user.entity';
|
|
|
|
@Entity()
|
|
export class ChatRoom {
|
|
@PrimaryGeneratedColumn()
|
|
id: number;
|
|
|
|
@Column()
|
|
latitude: number;
|
|
|
|
@Column()
|
|
longitude: number;
|
|
|
|
@Column()
|
|
radius: number;
|
|
|
|
@ManyToOne(() => User, (user) => user.chatRooms)
|
|
user: User;
|
|
}
|