feat: 工参小区按制式拆成 CellData_4G、CellData_5G;即席查询补上页面必带参数
两张表列名沿用平台工参表,已有快照由迁移 0008 原样搬过去。即席查询的 result 补 tableParams、columnname,计数补 indexcount=0,缺这些服务端会返回 stat 0。
This commit is contained in:
+37
-8
@@ -101,24 +101,53 @@ class GongcanSnapshot(Base):
|
||||
updated_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), default=utcnow)
|
||||
|
||||
|
||||
class GongcanCell(Base):
|
||||
__tablename__ = "gongcan_cell"
|
||||
class CellData4G(Base):
|
||||
"""4G 小区工参快照,列名沿用平台 4G 工参表。"""
|
||||
|
||||
__tablename__ = "CellData_4G"
|
||||
__table_args__ = (
|
||||
UniqueConstraint("snapshot_id", "cgi", "tech", name="uq_gongcan_cell"),
|
||||
Index("ix_gongcan_cell_site", "snapshot_id", "site_name"),
|
||||
UniqueConstraint("snapshot_id", "cgi", name="uq_celldata_4g_cgi"),
|
||||
Index("ix_celldata_4g_station", "snapshot_id", "station_name"),
|
||||
)
|
||||
|
||||
id: Mapped[int] = mapped_column(BigInteger().with_variant(Integer, "sqlite"), primary_key=True)
|
||||
snapshot_id: Mapped[int] = mapped_column(ForeignKey("gongcan_snapshot.id", ondelete="CASCADE"))
|
||||
tech: Mapped[str] = mapped_column(String(4))
|
||||
cgi: Mapped[str] = mapped_column(String(64))
|
||||
cell_name: Mapped[str] = mapped_column(Text, default="")
|
||||
site_name: Mapped[str] = mapped_column(Text, default="")
|
||||
station_name: Mapped[str] = mapped_column(Text, default="")
|
||||
latitude: Mapped[float | None] = mapped_column(Float, nullable=True)
|
||||
longitude: Mapped[float | None] = mapped_column(Float, nullable=True)
|
||||
enodeb_id: Mapped[str] = mapped_column(Text, default="")
|
||||
enodeb_name: Mapped[str] = mapped_column(Text, default="")
|
||||
network_type: Mapped[str] = mapped_column(Text, default="")
|
||||
area: Mapped[str] = mapped_column(Text, default="")
|
||||
town: Mapped[str] = mapped_column(Text, default="")
|
||||
state: Mapped[str] = mapped_column(Text, default="")
|
||||
cover_type: Mapped[str] = mapped_column(Text, default="")
|
||||
frequency_band: Mapped[str] = mapped_column(Text, default="")
|
||||
vendor: Mapped[str] = mapped_column(Text, default="")
|
||||
azimuth: Mapped[str] = mapped_column(Text, default="")
|
||||
|
||||
|
||||
class CellData5G(Base):
|
||||
"""5G 小区工参快照,列名沿用平台 5G 工参表。"""
|
||||
|
||||
__tablename__ = "CellData_5G"
|
||||
__table_args__ = (
|
||||
UniqueConstraint("snapshot_id", "ncgi", name="uq_celldata_5g_ncgi"),
|
||||
Index("ix_celldata_5g_station", "snapshot_id", "station_name"),
|
||||
)
|
||||
|
||||
id: Mapped[int] = mapped_column(BigInteger().with_variant(Integer, "sqlite"), primary_key=True)
|
||||
snapshot_id: Mapped[int] = mapped_column(ForeignKey("gongcan_snapshot.id", ondelete="CASCADE"))
|
||||
ncgi: Mapped[str] = mapped_column(String(64))
|
||||
nrcell_name: Mapped[str] = mapped_column(Text, default="")
|
||||
station_name: Mapped[str] = mapped_column(Text, default="")
|
||||
latitude: Mapped[float | None] = mapped_column(Float, nullable=True)
|
||||
longitude: Mapped[float | None] = mapped_column(Float, nullable=True)
|
||||
gnodeb_id: Mapped[str] = mapped_column(Text, default="")
|
||||
gnodeb_name: Mapped[str] = mapped_column(Text, default="")
|
||||
network_type: Mapped[str] = mapped_column(Text, default="")
|
||||
node_id: Mapped[str] = mapped_column(Text, default="")
|
||||
node_name: Mapped[str] = mapped_column(Text, default="")
|
||||
area: Mapped[str] = mapped_column(Text, default="")
|
||||
town: Mapped[str] = mapped_column(Text, default="")
|
||||
state: Mapped[str] = mapped_column(Text, default="")
|
||||
|
||||
Reference in New Issue
Block a user