|
| 1 | +from pydantic import BaseModel, constr |
| 2 | +import datetime |
| 3 | +from typing import Optional |
| 4 | + |
| 5 | + |
| 6 | +class WxStation(BaseModel): |
| 7 | + id: int |
| 8 | + created_at: Optional[datetime.datetime] |
| 9 | + updated_at: Optional[datetime.datetime] |
| 10 | + name: constr(max_length=256) |
| 11 | + alias_name: Optional[constr(max_length=256)] |
| 12 | + begin_date: Optional[datetime.datetime] |
| 13 | + end_date: Optional[datetime.datetime] |
| 14 | + longitude: float |
| 15 | + latitude: float |
| 16 | + elevation: Optional[float] |
| 17 | + code: constr(max_length=64) |
| 18 | + wmo: Optional[int] |
| 19 | + wigos: Optional[constr(max_length=64)] |
| 20 | + is_active: bool |
| 21 | + is_automatic: bool |
| 22 | + organization: Optional[constr(max_length=256)] |
| 23 | + observer: Optional[constr(max_length=256)] |
| 24 | + watershed: Optional[constr(max_length=256)] |
| 25 | + z: Optional[float] |
| 26 | + datum: Optional[constr(max_length=256)] |
| 27 | + zone: Optional[constr(max_length=256)] |
| 28 | + ground_water_province: Optional[constr(max_length=256)] |
| 29 | + river_code: Optional[int] |
| 30 | + river_course: Optional[constr(max_length=64)] |
| 31 | + catchment_area_station: Optional[constr(max_length=256)] |
| 32 | + river_origin: Optional[constr(max_length=256)] |
| 33 | + easting: Optional[float] |
| 34 | + northing: Optional[float] |
| 35 | + river_outlet: Optional[constr(max_length=256)] |
| 36 | + river_length: Optional[int] |
| 37 | + local_land_use: Optional[constr(max_length=256)] |
| 38 | + soil_type: Optional[constr(max_length=64)] |
| 39 | + site_description: Optional[constr(max_length=256)] |
| 40 | + land_surface_elevation: Optional[float] |
| 41 | + screen_length: Optional[float] |
| 42 | + top_casing_land_surface: Optional[float] |
| 43 | + depth_midpoint: Optional[float] |
| 44 | + screen_size: Optional[float] |
| 45 | + casing_type: Optional[constr(max_length=256)] |
| 46 | + casing_diameter: Optional[float] |
| 47 | + existing_gauges: Optional[constr(max_length=256)] |
| 48 | + flow_direction_at_station: Optional[constr(max_length=256)] |
| 49 | + flow_direction_above_station: Optional[constr(max_length=256)] |
| 50 | + flow_direction_below_station: Optional[constr(max_length=256)] |
| 51 | + bank_full_stage: Optional[constr(max_length=256)] |
| 52 | + bridge_level: Optional[constr(max_length=256)] |
| 53 | + access_point: Optional[constr(max_length=256)] |
| 54 | + temporary_benchmark: Optional[constr(max_length=256)] |
| 55 | + mean_sea_level: Optional[constr(max_length=256)] |
| 56 | + data_type: Optional[constr(max_length=256)] |
| 57 | + frequency_observation: Optional[constr(max_length=256)] |
| 58 | + historic_events: Optional[constr(max_length=256)] |
| 59 | + other_information: Optional[constr(max_length=256)] |
| 60 | + hydrology_station_type: Optional[constr(max_length=64)] |
| 61 | + is_surface: bool |
| 62 | + station_details: Optional[constr(max_length=256)] |
| 63 | + remarks: Optional[constr(max_length=256)] |
| 64 | + region: Optional[constr(max_length=256)] |
| 65 | + utc_offset_minutes: int |
| 66 | + alternative_names: Optional[constr(max_length=256)] |
| 67 | + wmo_station_plataform: Optional[constr(max_length=256)] |
| 68 | + operation_status: bool |
| 69 | + communication_type_id: Optional[int] |
| 70 | + data_source_id: Optional[int] |
| 71 | + profile_id: Optional[int] |
| 72 | + wmo_program_id: Optional[int] |
| 73 | + wmo_region_id: Optional[int] |
| 74 | + wmo_station_type_id: Optional[int] |
| 75 | + relocation_date: Optional[datetime.datetime] |
| 76 | + network: Optional[constr(max_length=256)] |
| 77 | + reference_station_id: Optional[int] |
| 78 | + country_id: Optional[int] |
| 79 | + |
| 80 | + class Config: |
| 81 | + orm_mode = True |
| 82 | + allow_population_by_field_name = True |
| 83 | + |
0 commit comments