树状图模型的实现

模型搭建
基本模型
子目录1
根目录
摄像头1
摄像头2
子目录2
更多
使用框架
springdata-jpa
数据库设计
- createTable:
            tableName: CAMERA_RESOURCE
            columns:
              - column:
                  name: TYPE
                  type: varchar(10)
                  remarks: 节点类型
                  constraints:
                    nullable: false
              - column:
                  name: ID
                  type: INTEGER
                  remarks: ID
                  constraints:
                    primaryKey: true
                    nullable: false
              - column:
                  name: ORDER_NO
                  type: INTEGER
                  remarks: 序号
                  constraints:
                    nullable: false
              - column:
                  name: NAME
                  type: ${
   string.type}(50)
                  remarks: 名称
              - column:
                  name: CAM_INDEX_CODE
                  type: ${
   string.type}(64)
                  remarks: 监控点唯一标识
              - column:
                  name: CAM_TYPE
                  type: INTEGER
                  remarks: 监控点类型
              - column:
                  name: CAM_TYPE_NAME
                  type: ${
   string.type}(32)
                  remarks: 监控点类型说明
              - column:
                  name: CAM_CAPABILITY_SET
                  type: ${
   string.type}(500)
                  remarks: 能力集
              - column:
                  name: CAM_LAT
                  type: NUMBER(16,13)
                  remarks: 纬度
              - column:
                  name: CAM_LNG
                  type: NUMBER(16,13)
                  remarks: 经度
              - column:
                  name: CAM_RECORD_LOCATION
                  type: ${
   string.type}(32)
                  remarks: 录像存储位置
              - column:
                  name: CAM_ADDRESS
                  type: ${
   string.type}(256)
                  remarks: 联系地址
              - column:
                  name: PARENT_ID
                  type: INTEGER
                  remarks: 外键列名

        - addForeignKeyConstraint:
            baseColumnNames: PARENT_ID
            baseTableName: CAMERA_RESOURCE
            constraintName: FK_CAMERA_RESOURCE_PARENT
            onDelete: CASCADE
            onUpdate: RESTRICT
            referencedColumnNames: ID
            referencedTableName: CAMERA_RESOURCE

        - createSequence:
            cycle: false
            incrementBy: 1
            sequenceName: SEQ_CAMERA_ID
```mermaid
flowchat
st=>start: Start|past
e=>end: End
op1=>operation: My Operation|past
op2=>operatio
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值