Skip to content

bridge71/helloStrings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

helloStrings

helloStrings could be a forum, with a name inspired by Shi Tiesheng's《strings of life》. The back end is gin, also using gorm to interact with database. And the front end uses vue3 with naiveUI and primevue.

Priject Preview

posts post books space qrcode

Functions

  1. post with an editor and comment in a post
  2. upload the information of book and contact with the seller with QR code.
  3. record the post of posted, liked and commented.

Database

create table book_sales(
  created_at datetime(3),
 title   VARCHAR(36),
 author     VARCHAR(36),
 profession VARCHAR(36),
 course     VARCHAR(36),
 common     bool,
 is_sold    bool,
 userId     int,
 value      int
);
CREATE TABLE ips (
  created_at datetime(3) DEFAULT NULL,
  IP varchar(36) DEFAULT NULL,
  userId int(11) DEFAULT NULL,
  lng float DEFAULT NULL,
  lat float DEFAULT NULL,
  province varchar(30) DEFAULT NULL,
  city varchar(21) DEFAULT NULL,
  district varchar(21) DEFAULT NULL
);
create table posts(
  userId int,
  postId INT AUTO_INCREMENT PRIMARY KEY,
  created_at datetime(3),
  nickname VARCHAR(36),
  title VARCHAR(60),
  likes int,
  is_shown bool
);
create table comments(
  userId int,
  postId INT ,
  created_at datetime(3),
  nickname VARCHAR(36),
  is_shown bool,
  content VARCHAR(1800)
);
create table post_contents(
  postId int PRIMARY KEY,
  content longtext
);

create table likes(
  postId int ,
  userId int ,
  created_at datetime(3),
  PRIMARY KEY (postId, userId)
);

create table comment_marks(
  postId int ,
  userId int ,
  PRIMARY KEY (postId, userId)
);
CREATE TABLE users (
    userId INT AUTO_INCREMENT PRIMARY KEY,
    nickname VARCHAR(36) NOT NULL,
    email VARCHAR(36) NOT NULL,
    passwordHash VARCHAR(63) NOT NULL,
    level INT,
    UNIQUE (nickname),
    UNIQUE (email)
);

Releases

No releases published

Packages

No packages published

Languages