feat: added location to wifiscan table

This commit is contained in:
2024-12-30 22:23:37 +01:00
parent 8b8c6aef2a
commit 9ef53f4116
3 changed files with 13 additions and 2 deletions

View File

@ -2,10 +2,12 @@ import { DataTypes, Model } from "sequelize";
import { sequelize } from "../database/database";
export class WifiScan extends Model {
public wifi_scan_id!: string;
public lp_ttn_end_device_uplinks_id!: string;
public wifi_scan_id!: string;
public mac!: string;
public rssi!: number;
public latitude!: number;
public longitude!: number;
public created_at_utc!: Date;
public updated_at_utc!: Date;
}
@ -30,6 +32,14 @@ WifiScan.init(
type: DataTypes.NUMBER,
allowNull: true,
},
latitude: {
type: DataTypes.NUMBER,
allowNull: true,
},
longitude: {
type: DataTypes.NUMBER,
allowNull: true,
},
created_at_utc: {
type: DataTypes.DATE,
defaultValue: DataTypes.NOW,