-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
52 changed files
with
5,629 additions
and
3,629 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package com.jixialunbi.model; | ||
|
||
import com.fasterxml.jackson.annotation.JsonFormat; | ||
import jakarta.persistence.*; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import org.hibernate.annotations.UpdateTimestamp; | ||
|
||
import java.time.LocalDateTime; | ||
import java.util.ArrayList; | ||
import java.util.HashSet; | ||
import java.util.List; | ||
import java.util.Set; | ||
|
||
@Getter | ||
@Setter | ||
@Entity | ||
public class Tag { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private long id; | ||
|
||
@Column(name = "name") | ||
private String name; | ||
|
||
@Column(name = "description") | ||
private String description; | ||
|
||
@ManyToMany(mappedBy = "tags") | ||
private List<Post> posts = new ArrayList<>(); | ||
|
||
@JsonFormat | ||
@Column(name = "created_at", columnDefinition = "DATETIME DEFAULT NOW()") | ||
private LocalDateTime createdAt; | ||
|
||
@JsonFormat | ||
@Column(name = "updated_at", columnDefinition = "DATETIME DEFAULT NOW()") | ||
@UpdateTimestamp | ||
private LocalDateTime updatedAt; | ||
} |
3 changes: 2 additions & 1 deletion
3
server/src/main/java/com/jixialunbi/repository/TagRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
package com.jixialunbi.repository; | ||
|
||
import com.jixialunbi.model.Category; | ||
import com.jixialunbi.model.Tag; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
|
||
public interface CategoryRepository extends JpaRepository<Category, Long> { | ||
public interface TagRepository extends JpaRepository<Tag, Long> { | ||
|
||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import home from '@/components/home'; | ||
|
||
export default home; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import 'antd/dist/reset.css'; | ||
import '@/styles/global.css'; | ||
import '@/styles/style.scss'; | ||
import zhCN from 'antd/lib/locale/zh_CN'; | ||
import { ConfigProvider } from 'antd'; | ||
import { AntdRegistry } from '@ant-design/nextjs-registry'; | ||
|
||
export default function RootLayout({ children }: { children: React.ReactNode }) { | ||
return ( | ||
<html lang="zh-CN"> | ||
<title>积下_微社区</title> | ||
<meta name="keywords" content="积下微社区, bbs, 论坛" /> | ||
<meta name="description" content="积下是一个简洁清爽的微社区,分享各种有趣内容,你感兴趣的都在这里!"></meta> | ||
<body> | ||
<AntdRegistry> | ||
<ConfigProvider locale={zhCN}>{children}</ConfigProvider> | ||
</AntdRegistry> | ||
</body> | ||
</html> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import Home from '@/components/home'; | ||
export default Home |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import post from '../../../components/post'; | ||
export default post; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import Profile from '../../../components/Profile'; | ||
|
||
export default Profile; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import ProfileEdit from '../../../../components/ProfileEdit'; | ||
|
||
export default ProfileEdit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import Write from '../../components/Write'; | ||
|
||
export default Write; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
} | ||
|
||
.wrap { | ||
width: 665px; | ||
width: 645px; | ||
margin: 0 auto; | ||
display: flex; | ||
flex-direction: column; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
'use server' | ||
|
||
import axios from '@/libs/axios'; | ||
import { AxiosRequestConfig } from 'axios'; | ||
import { useParams } from 'next/navigation'; | ||
import React from 'react'; | ||
|
||
interface Props { | ||
url: string; | ||
config?: AxiosRequestConfig<any>; | ||
Component: React.FC<any>; | ||
} | ||
|
||
export default async function LoadAsyncMore(props: Props) { | ||
const { url, config, Component } = props; | ||
const data = await axios.get(url, config).then((res) => res.data); | ||
return <Component data={data}></Component>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.