cubes:
  - name: dict_item
    sql_table: inventory_v2.dict_item
    data_source: default

    joins:
      - name: dict
        sql: "{CUBE}.dict_id = {dict.id}"
        relationship: many_to_one

    dimensions:
      - name: id
        sql: id
        type: number
        primary_key: true

      - name: description
        sql: description
        type: string

      - name: image
        sql: image
        type: string

      - name: name
        sql: name
        type: string

      - name: shortname
        sql: "{CUBE}.`shortName`"
        type: string

      - name: title
        sql: title
        type: string

      - name: titlecn
        sql: "{CUBE}.`titleCN`"
        type: string

      - name: value
        sql: value
        type: string

      - name: createdat
        sql: "{CUBE}.`createdAt`"
        type: time

      - name: updatedat
        sql: "{CUBE}.`updatedAt`"
        type: time

    measures:
      - name: count
        type: count

    pre_aggregations:
      # Pre-aggregation definitions go here.
      # Learn more in the documentation: https://cube.dev/docs/caching/pre-aggregations/getting-started

