SQL Schema - TechnocultureResearch/VVplus Wiki

⚠️ This documentation is prone to go out of date over time.

API

graph LR

Save[Save Button] --> |house.json| S[api.save.id]
GA[api.house.id] --> |house.json| G[GetHouseById SSR]

SQL Schema

Tables

Asset

CREATE TABLE `Asset` (
	`asset_id` binary(16) NOT NULL,
	`name` varchar(255) NOT NULL,
	`description` varchar(255),
	`category_id` binary(16) NOT NULL,
	`3d_url` varchar(255) NOT NULL,
	`thumbnail_sm` varchar(255) NOT NULL,
	`hero` varchar(255) NOT NULL,
	PRIMARY KEY (`asset_id`),
	KEY `category_idx` (`category_id`)
) ENGINE InnoDB,
  CHARSET utf8mb4,
  COLLATE utf8mb4_0900_ai_ci;

Asset Category

CREATE TABLE `AssetCategory` (
	`category_id` binary(16) NOT NULL,
	`name` varchar(255) NOT NULL,
	`description` varchar(255) NOT NULL,
	PRIMARY KEY (`category_id`)
) ENGINE InnoDB,
  CHARSET utf8mb4,
  COLLATE utf8mb4_0900_ai_ci;

Model

CREATE TABLE `Model` (
	`model_id` binary(16) NOT NULL,
	`user_id` binary(16) NOT NULL,
	`main_gate` binary(16) NOT NULL,
	`boundary` binary(16) NOT NULL,
	`balcony` binary(16) NOT NULL,
	`structure_gf` binary(16) NOT NULL,
	`structure_ff` binary(16) NOT NULL,
	`structure_sf` binary(16) NOT NULL,
	PRIMARY KEY (`model_id`),
	KEY `user_idx` (`user_id`),
	KEY `main_gate_idx` (`main_gate`),
	KEY `boundary_idx` (`boundary`),
	KEY `balcony_idx` (`balcony`),
	KEY `structure_gf_idx` (`structure_gf`),
	KEY `structure_ff_idx` (`structure_ff`),
	KEY `structure_sf_idx` (`structure_sf`)
) ENGINE InnoDB,
  CHARSET utf8mb4,
  COLLATE utf8mb4_0900_ai_ci;

Template

CREATE TABLE `Template` (
	`template_id` binary(16) NOT NULL,
	`model_id` binary(16) NOT NULL,
	`name` varchar(255) NOT NULL,
	PRIMARY KEY (`template_id`),
	UNIQUE KEY `model_idx` (`model_id`)
) ENGINE InnoDB,
  CHARSET utf8mb4,
  COLLATE utf8mb4_0900_ai_ci;

User

CREATE TABLE `User` (
	`user_id` binary(16) NOT NULL,
	`name` varchar(255) NOT NULL,
	`phone_number` varchar(255) NOT NULL,
	`email_id` varchar(255) NOT NULL,
	PRIMARY KEY (`user_id`)
) ENGINE InnoDB,
  CHARSET utf8mb4,
  COLLATE utf8mb4_0900_ai_ci;