---
# System prepended metadata

title: database schema

---

# database schema

## `Device`
* UUID String
* Name string
* Type String

## `DataSet`
* UUID String
* CreateAt DateTime
* DeleteAt DateTime
* Name String
* Description String
* DimensionType String {3DType, 2DType}
* isTiming Bool 

## `File`
* UUID String
* CreateAt DateTime
* DeleteAt DateTime
* Device -> `Device`
* FileName String
* UUIDHash String (sha256)
* Size uint64
* MIME String
* Content String
* CTime DateTime
* MTime DateTime

## `Scenario`
* UUID String
* CreateAt DateTime
* DeleteAt DateTime
* Files manytomany -> `file` 
* Annotations manytomany -> `annotation`
* Weather String
* DateTime NanoDateTime
* GlobalRoadType Enum(Highway / City / Country)
* Nation String
* Province String
* City String
* District String 
* Street String
* GPS String
* CollectionCarID String // 采集车辆ID
* LaneHasIsolationBelt Bool // 是否有隔离带
* LaneIsWear Bool // 是否磨损
* LaneIsNew Bool // 是否新/旧线
* LaneIsShading Bool // 是否遮挡
* LaneColor Enum(yellow/white)
* LaneType Enum(solied/dashed)
* RoadLevel String // 道路类型
* RoadCurvature uint32
* LocalRoadType String // 局部道路类型(直道， 左/右弯道，路口（十字 / T 字），上下坡，匝道口，收费站，公交站台，停车场等)
* LightType String 
* ExistParking Bool // 是否有停车场
* ExistAccident Bool // 是否有车祸
* ExistConstruction Bool // 是否有施工路段
* ExistBumpyRoad Bool // 是否有颠簸路段
* ExistLotPond Bool // 是否有较多积水路段
* ExistAbnormalRoad Bool // 是否道路路面异常
* ObstacleType String
* ObstacleNum uint32
* ObstacleSize String // 障碍物大小
* ExistSpecialVehicle Bool // 是否有特种车辆
* SelfVehicleAction String // 自车行为（直行，转弯，换道，掉头，急刹车 / 急转弯 / 急加速）
* OtherVehicleAction String // cutIn/cutOut
* SpeedAverage Float
* SpeedMin Float
* SpeedMax Float

## `Frame`

## `Object_[Class]`

## `Annotation`
* UUID String
* Version String
* CreateAt DateTime
* DeleteAt DateTime
* Type String
* File -> `File`


# annotation format
``` update
{
    "Type": "scenario",
    "UUID": "UUID",
    "LaneIsNew": true,
    
    ...
}
```

``` create
{
    "Type": "scenario",
    ...
}
```