first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
import { IsString, MinLength, MaxLength, IsNotEmpty } from 'class-validator'
export interface CommentParams {
comment_text: string;
comment_father_id: number;
article_id: number;
user_reply_id: number;
}

View File

@@ -0,0 +1,7 @@
export interface addMenuParams {
icon: string;
text: string;
path: string;
type: number;
number;number;
}

View File

@@ -0,0 +1,5 @@
export interface Token {
user_id: number;
user_name: string;
iat: number
}

View File

@@ -0,0 +1,18 @@
import { IsString, MinLength, MaxLength, IsNotEmpty } from 'class-validator'
export class getOneUser {
@IsNotEmpty()
id!: number;
}
export class addUser {
@IsString({ message: "用户名必须字符串" })
@MinLength(3, { message: "用户名最少3个" })
@MaxLength(10, { message: "用户名最长10个" })
name!: string;
@IsString({ message: "密码必须字符串" })
@MinLength(6, { message: "密码最少6位" })
@MaxLength(20, { message: "密码最长20位" })
@IsNotEmpty({message: "密码不为空"})
pwd!: string;
}

View File

@@ -0,0 +1,39 @@
export interface categories {
categories_id: number;
categories_title: string;
}
export interface tag {
tag_id: number;
tag_title: string;
}
export interface comment {
[key: string]: any;
comment_id: number;
comment_text: string;
comment_time: number;
comment_father_id: number;
article_id: number;
comment_reply_id: number;
user_id: number;
user_name: string;
user_img: string;
user_reply_id: number;
user_reply_name: string;
comment_children: comment[]
}
export interface Article {
article_id: number;
article_user: number;
article_title: string;
article_time: number;
article_text: string;
article_backimg: string;
article_view: number;
article_comment: comment[];
categories_id: categories[];
tag_id: tag[];
}

View File

@@ -0,0 +1,9 @@
export interface User {
user_id: number;
user_name: string;
user_pwd: string;
user_img: string;
user_type: number;
user_addtime: number;
}