create table t_classmate
(
	id BIGINT NOT NULL AUTO_INCREMENT,
	name VARCHAR(32) NOT NULL,
	gender TINYINT NOT NULL DEFAULT 0,
	password VARCHAR(32) NOT NULL,
	phone VARCHAR(13),
	work_city VARCHAR(32),
	work_addr VARCHAR(255),
	home_town VARCHAR(32),
	home_addr VARCHAR(255),
	updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
	created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
	PRIMARY KEY (id)
);
create table t_topic
(
	id BIGINT NOT NULL AUTO_INCREMENT,
	topic VARCHAR(128) NOT NULL,
	images VARCHAR(512),
	detail VARCHAR(1024),
	updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
	created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
	PRIMARY KEY (id)
);
create table t_comment
(
	id BIGINT NOT NULL AUTO_INCREMENT,
	topic_id BIGINT NOT NULL,
	classmate_id BIGINT NOT NULL,
	images VARCHAR(512),
	comment VARCHAR(1024),
	updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
	created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
	PRIMARY KEY (id)
);
create table t_image
(
	id BIGINT NOT NULL AUTO_INCREMENT,
	uuid VARCHAR(32) NOT NULL,
	file_type VARCHAR(8) NOT NULL,
	path VARCHAR(128) NOT NULL,
	uploaded_by BIGINT NOT NULL,
	uploaded_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
	PRIMARY KEY(id)
);