mirror of https://github.com/halo-dev/halo
完善注释
parent
68b78b9267
commit
5846d5abb9
3
pom.xml
3
pom.xml
|
@ -6,9 +6,8 @@
|
||||||
<artifactId>halo</artifactId>
|
<artifactId>halo</artifactId>
|
||||||
<version>latest</version>
|
<version>latest</version>
|
||||||
<name>halo</name>
|
<name>halo</name>
|
||||||
<!-- 虽然Halo使用了宽松的GPL协议,但开发不易,希望您可以保留一下版权声明。笔芯~ -->
|
|
||||||
<description>
|
<description>
|
||||||
Halo,一个基于 SpringBoot 的博客系统,最求轻快,易用,以内容为中心。
|
Halo,Personal blog system developed using Java.
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
<organization>
|
<organization>
|
||||||
|
|
|
@ -13,9 +13,7 @@ import org.springframework.context.annotation.Configuration;
|
||||||
import javax.annotation.PostConstruct;
|
import javax.annotation.PostConstruct;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <pre>
|
* FreeMarker configuration.
|
||||||
* FreeMarker配置
|
|
||||||
* </pre>
|
|
||||||
*
|
*
|
||||||
* @author : RYAN0UP
|
* @author : RYAN0UP
|
||||||
* @date : 2018/4/26
|
* @date : 2018/4/26
|
||||||
|
@ -61,7 +59,7 @@ public class FreeMarkerAutoConfiguration {
|
||||||
public void setSharedVariable() {
|
public void setSharedVariable() {
|
||||||
try {
|
try {
|
||||||
configuration.setSharedVariable("options", optionsService.listOptions());
|
configuration.setSharedVariable("options", optionsService.listOptions());
|
||||||
//自定义标签
|
//Freemarker custom tags
|
||||||
configuration.setSharedVariable("categoryTag", categoryTagDirective);
|
configuration.setSharedVariable("categoryTag", categoryTagDirective);
|
||||||
configuration.setSharedVariable("commentTag", commentTagDirective);
|
configuration.setSharedVariable("commentTag", commentTagDirective);
|
||||||
configuration.setSharedVariable("linkTag", linkTagDirective);
|
configuration.setSharedVariable("linkTag", linkTagDirective);
|
||||||
|
|
|
@ -9,8 +9,6 @@ import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.core.Ordered;
|
import org.springframework.core.Ordered;
|
||||||
import org.springframework.data.domain.Page;
|
|
||||||
import org.springframework.data.domain.PageImpl;
|
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.data.domain.Sort;
|
import org.springframework.data.domain.Sort;
|
||||||
import org.springframework.lang.NonNull;
|
import org.springframework.lang.NonNull;
|
||||||
|
@ -23,7 +21,6 @@ import springfox.documentation.service.*;
|
||||||
import springfox.documentation.spi.DocumentationType;
|
import springfox.documentation.spi.DocumentationType;
|
||||||
import springfox.documentation.spi.service.contexts.SecurityContext;
|
import springfox.documentation.spi.service.contexts.SecurityContext;
|
||||||
import springfox.documentation.spring.web.plugins.Docket;
|
import springfox.documentation.spring.web.plugins.Docket;
|
||||||
import springfox.documentation.spring.web.plugins.JacksonSerializerConvention;
|
|
||||||
import springfox.documentation.swagger.web.SecurityConfiguration;
|
import springfox.documentation.swagger.web.SecurityConfiguration;
|
||||||
import springfox.documentation.swagger.web.SecurityConfigurationBuilder;
|
import springfox.documentation.swagger.web.SecurityConfigurationBuilder;
|
||||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||||
|
@ -137,7 +134,7 @@ public class SwaggerConfiguration {
|
||||||
.title("Halo API Documentation")
|
.title("Halo API Documentation")
|
||||||
.description("Documentation for Halo API")
|
.description("Documentation for Halo API")
|
||||||
.version(HALO_VERSION)
|
.version(HALO_VERSION)
|
||||||
.termsOfServiceUrl("https://ryanc.cc/")
|
.termsOfServiceUrl("https://github.com/halo-dev")
|
||||||
.contact(new Contact("RYAN0UP", "https://ryanc.cc/", "i#ryanc.cc"))
|
.contact(new Contact("RYAN0UP", "https://ryanc.cc/", "i#ryanc.cc"))
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,9 +29,7 @@ import org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <pre>
|
* Mvc configuration.
|
||||||
* 拦截器,资源路径配置
|
|
||||||
* </pre>
|
|
||||||
*
|
*
|
||||||
* @author : RYAN0UP
|
* @author : RYAN0UP
|
||||||
* @date : 2018/1/2
|
* @date : 2018/1/2
|
||||||
|
@ -66,7 +64,7 @@ public class WebMvcAutoConfiguration implements WebMvcConfigurer {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 配置静态资源路径
|
* Configuring static resource path
|
||||||
*
|
*
|
||||||
* @param registry registry
|
* @param registry registry
|
||||||
*/
|
*/
|
||||||
|
@ -100,6 +98,11 @@ public class WebMvcAutoConfiguration implements WebMvcConfigurer {
|
||||||
registry.addConverterFactory(new StringToEnumConverterFactory());
|
registry.addConverterFactory(new StringToEnumConverterFactory());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configuring freemarker template file path.
|
||||||
|
*
|
||||||
|
* @return new FreeMarkerConfigurer
|
||||||
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
public FreeMarkerConfigurer freemarkerConfig() {
|
public FreeMarkerConfigurer freemarkerConfig() {
|
||||||
FreeMarkerConfigurer configurer = new FreeMarkerConfigurer();
|
FreeMarkerConfigurer configurer = new FreeMarkerConfigurer();
|
||||||
|
@ -108,6 +111,11 @@ public class WebMvcAutoConfiguration implements WebMvcConfigurer {
|
||||||
return configurer;
|
return configurer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configuring view resolver
|
||||||
|
*
|
||||||
|
* @param registry registry
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void configureViewResolvers(ViewResolverRegistry registry) {
|
public void configureViewResolvers(ViewResolverRegistry registry) {
|
||||||
FreeMarkerViewResolver resolver = new FreeMarkerViewResolver();
|
FreeMarkerViewResolver resolver = new FreeMarkerViewResolver();
|
||||||
|
|
|
@ -32,9 +32,7 @@ import java.util.Map;
|
||||||
import static cc.ryanc.halo.model.support.HaloConst.DEFAULT_THEME_NAME;
|
import static cc.ryanc.halo.model.support.HaloConst.DEFAULT_THEME_NAME;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <pre>
|
* The method executed after the application is started.
|
||||||
* 应用启动完成后所执行的方法
|
|
||||||
* </pre>
|
|
||||||
*
|
*
|
||||||
* @author : RYAN0UP
|
* @author : RYAN0UP
|
||||||
* @date : 2018/12/5
|
* @date : 2018/12/5
|
||||||
|
|
|
@ -30,13 +30,13 @@ public class Attachment extends BaseEntity {
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 附件名称
|
* Attachment name.
|
||||||
*/
|
*/
|
||||||
@Column(name = "name", columnDefinition = "varchar(255) not null")
|
@Column(name = "name", columnDefinition = "varchar(255) not null")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 附件路径
|
* Attachment access path.
|
||||||
*/
|
*/
|
||||||
@Column(name = "path", columnDefinition = "varchar(1023) not null")
|
@Column(name = "path", columnDefinition = "varchar(1023) not null")
|
||||||
private String path;
|
private String path;
|
||||||
|
@ -48,19 +48,19 @@ public class Attachment extends BaseEntity {
|
||||||
private String fileKey;
|
private String fileKey;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 缩略图路径
|
* Thumbnail access path.
|
||||||
*/
|
*/
|
||||||
@Column(name = "thumb_path", columnDefinition = "varchar(1023) default ''")
|
@Column(name = "thumb_path", columnDefinition = "varchar(1023) default ''")
|
||||||
private String thumbPath;
|
private String thumbPath;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 附件类型
|
* Attachment media type.
|
||||||
*/
|
*/
|
||||||
@Column(name = "media_type", columnDefinition = "varchar(50) not null")
|
@Column(name = "media_type", columnDefinition = "varchar(50) not null")
|
||||||
private String mediaType;
|
private String mediaType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 附件后缀
|
* Attachment suffix,such as .png,.jpg
|
||||||
*/
|
*/
|
||||||
@Column(name = "suffix", columnDefinition = "varchar(50) default ''")
|
@Column(name = "suffix", columnDefinition = "varchar(50) default ''")
|
||||||
private String suffix;
|
private String suffix;
|
||||||
|
@ -78,13 +78,13 @@ public class Attachment extends BaseEntity {
|
||||||
private Integer height;
|
private Integer height;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 附件大小
|
* Attachment size.
|
||||||
*/
|
*/
|
||||||
@Column(name = "size", columnDefinition = "bigint not null")
|
@Column(name = "size", columnDefinition = "bigint not null")
|
||||||
private Long size;
|
private Long size;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 附件上传类型
|
* Attachment upload type,LOCAL,UPYUN or QNYUN.
|
||||||
*/
|
*/
|
||||||
@Column(name = "type", columnDefinition = "int default 0")
|
@Column(name = "type", columnDefinition = "int default 0")
|
||||||
private AttachmentType type;
|
private AttachmentType type;
|
||||||
|
|
|
@ -21,21 +21,21 @@ import java.util.Date;
|
||||||
public class BaseEntity {
|
public class BaseEntity {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建时间戳
|
* Create time.
|
||||||
*/
|
*/
|
||||||
@Column(name = "create_time", columnDefinition = "timestamp default CURRENT_TIMESTAMP")
|
@Column(name = "create_time", columnDefinition = "timestamp default CURRENT_TIMESTAMP")
|
||||||
@Temporal(TemporalType.TIMESTAMP)
|
@Temporal(TemporalType.TIMESTAMP)
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间戳
|
* Update time.
|
||||||
*/
|
*/
|
||||||
@Column(name = "update_time", columnDefinition = "timestamp default CURRENT_TIMESTAMP")
|
@Column(name = "update_time", columnDefinition = "timestamp default CURRENT_TIMESTAMP")
|
||||||
@Temporal(TemporalType.TIMESTAMP)
|
@Temporal(TemporalType.TIMESTAMP)
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否已删除
|
* Delete flag.
|
||||||
*/
|
*/
|
||||||
@Column(name = "deleted", columnDefinition = "TINYINT default 0")
|
@Column(name = "deleted", columnDefinition = "TINYINT default 0")
|
||||||
private Boolean deleted = false;
|
private Boolean deleted = false;
|
||||||
|
|
|
@ -27,7 +27,7 @@ public class BasePost extends BaseEntity {
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文章标题
|
* Post title.
|
||||||
*/
|
*/
|
||||||
@Column(name = "title", columnDefinition = "varchar(100) not null")
|
@Column(name = "title", columnDefinition = "varchar(100) not null")
|
||||||
private String title;
|
private String title;
|
||||||
|
@ -45,67 +45,69 @@ public class BasePost extends BaseEntity {
|
||||||
private String url;
|
private String url;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 源内容
|
* Original content,not format.
|
||||||
*/
|
*/
|
||||||
@Column(name = "original_content", columnDefinition = "text not null")
|
@Column(name = "original_content", columnDefinition = "text not null")
|
||||||
private String originalContent;
|
private String originalContent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 渲染后内容
|
* Rendered content.
|
||||||
|
*
|
||||||
|
* @see cc.ryanc.halo.utils.MarkdownUtils#renderMarkdown(String)
|
||||||
*/
|
*/
|
||||||
@Column(name = "format_content", columnDefinition = "text not null")
|
@Column(name = "format_content", columnDefinition = "text not null")
|
||||||
private String formatContent;
|
private String formatContent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 摘要
|
* Post summary.
|
||||||
*/
|
*/
|
||||||
@Column(name = "summary", columnDefinition = "varchar(500) default ''")
|
@Column(name = "summary", columnDefinition = "varchar(500) default ''")
|
||||||
private String summary;
|
private String summary;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 缩略图
|
* Cover thumbnail of the post.
|
||||||
*/
|
*/
|
||||||
@Column(name = "thumbnail", columnDefinition = "varchar(1023) default ''")
|
@Column(name = "thumbnail", columnDefinition = "varchar(1023) default ''")
|
||||||
private String thumbnail;
|
private String thumbnail;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 浏览量
|
* Post visits.
|
||||||
*/
|
*/
|
||||||
@Column(name = "visits", columnDefinition = "bigint default 0")
|
@Column(name = "visits", columnDefinition = "bigint default 0")
|
||||||
private Long visits;
|
private Long visits;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否允许评论
|
* Whether to allow comments.
|
||||||
*/
|
*/
|
||||||
@Column(name = "disallow_comment", columnDefinition = "int default 0")
|
@Column(name = "disallow_comment", columnDefinition = "int default 0")
|
||||||
private Boolean disallowComment;
|
private Boolean disallowComment;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文章密码
|
* Post password.
|
||||||
*/
|
*/
|
||||||
@Column(name = "password", columnDefinition = "varchar(255) default ''")
|
@Column(name = "password", columnDefinition = "varchar(255) default ''")
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自定义渲染模板名称
|
* Custom template.
|
||||||
*/
|
*/
|
||||||
@Column(name = "template", columnDefinition = "varchar(255) default ''")
|
@Column(name = "template", columnDefinition = "varchar(255) default ''")
|
||||||
private String template;
|
private String template;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否置顶
|
* Whether to top the post.
|
||||||
*/
|
*/
|
||||||
@Column(name = "top_priority", columnDefinition = "int default 0")
|
@Column(name = "top_priority", columnDefinition = "int default 0")
|
||||||
private Integer topPriority;
|
private Integer topPriority;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发布来源
|
* Create from,server or WeChat.
|
||||||
*/
|
*/
|
||||||
@Column(name = "create_from", columnDefinition = "int default 0")
|
@Column(name = "create_from", columnDefinition = "int default 0")
|
||||||
private PostCreateFrom createFrom;
|
private PostCreateFrom createFrom;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 点赞量/喜欢量
|
* Likes
|
||||||
*/
|
*/
|
||||||
@Column(name = "likes", columnDefinition = "bigint default 0")
|
@Column(name = "likes", columnDefinition = "bigint default 0")
|
||||||
private Long likes;
|
private Long likes;
|
||||||
|
|
|
@ -27,25 +27,25 @@ public class Category extends BaseEntity {
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分类名称
|
* Category name.
|
||||||
*/
|
*/
|
||||||
@Column(name = "name", columnDefinition = "varchar(50) not null")
|
@Column(name = "name", columnDefinition = "varchar(50) not null")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 缩略名
|
* Category slug name.
|
||||||
*/
|
*/
|
||||||
@Column(name = "slug_name", columnDefinition = "varchar(50) not null")
|
@Column(name = "slug_name", columnDefinition = "varchar(50) not null")
|
||||||
private String slugName;
|
private String slugName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 描述
|
* Description,can be display on category page.
|
||||||
*/
|
*/
|
||||||
@Column(name = "description", columnDefinition = "varchar(100) default ''")
|
@Column(name = "description", columnDefinition = "varchar(100) default ''")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上级目录
|
* Parent category.
|
||||||
*/
|
*/
|
||||||
@Column(name = "parent_id", columnDefinition = "int default 0")
|
@Column(name = "parent_id", columnDefinition = "int default 0")
|
||||||
private Integer parentId;
|
private Integer parentId;
|
||||||
|
|
|
@ -28,25 +28,25 @@ public class Comment extends BaseEntity {
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 评论者昵称
|
* Commentator's name.
|
||||||
*/
|
*/
|
||||||
@Column(name = "author", columnDefinition = "varchar(50) not null")
|
@Column(name = "author", columnDefinition = "varchar(50) not null")
|
||||||
private String author;
|
private String author;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 评论者邮箱
|
* Commentator's email.
|
||||||
*/
|
*/
|
||||||
@Column(name = "email", columnDefinition = "varchar(255) default ''")
|
@Column(name = "email", columnDefinition = "varchar(255) default ''")
|
||||||
private String email;
|
private String email;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 评论者 ip 地址
|
* Commentator's ip address.
|
||||||
*/
|
*/
|
||||||
@Column(name = "ip_address", columnDefinition = "varchar(127) default ''")
|
@Column(name = "ip_address", columnDefinition = "varchar(127) default ''")
|
||||||
private String ipAddress;
|
private String ipAddress;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 评论者网址
|
* Commentator's website.
|
||||||
*/
|
*/
|
||||||
@Column(name = "author_url", columnDefinition = "varchar(512) default ''")
|
@Column(name = "author_url", columnDefinition = "varchar(512) default ''")
|
||||||
private String authorUrl;
|
private String authorUrl;
|
||||||
|
@ -58,7 +58,7 @@ public class Comment extends BaseEntity {
|
||||||
private String gavatarMd5;
|
private String gavatarMd5;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 评论内容
|
* Comment content.
|
||||||
*/
|
*/
|
||||||
@Column(name = "content", columnDefinition = "varchar(1023) not null")
|
@Column(name = "content", columnDefinition = "varchar(1023) not null")
|
||||||
private String content;
|
private String content;
|
||||||
|
@ -70,13 +70,13 @@ public class Comment extends BaseEntity {
|
||||||
private CommentStatus status;
|
private CommentStatus status;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UA 信息
|
* Commentator's userAgent.
|
||||||
*/
|
*/
|
||||||
@Column(name = "user_agent", columnDefinition = "varchar(512) default ''")
|
@Column(name = "user_agent", columnDefinition = "varchar(512) default ''")
|
||||||
private String userAgent;
|
private String userAgent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否为博主
|
* Is admin's comment.
|
||||||
*/
|
*/
|
||||||
@Column(name = "is_admin", columnDefinition = "tinyint default 0")
|
@Column(name = "is_admin", columnDefinition = "tinyint default 0")
|
||||||
private Boolean isAdmin;
|
private Boolean isAdmin;
|
||||||
|
@ -88,13 +88,13 @@ public class Comment extends BaseEntity {
|
||||||
private Integer postId;
|
private Integer postId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否置顶
|
* Whether to top the comment.
|
||||||
*/
|
*/
|
||||||
@Column(name = "top_priority", columnDefinition = "int default 0")
|
@Column(name = "top_priority", columnDefinition = "int default 0")
|
||||||
private Integer topPriority;
|
private Integer topPriority;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上级评论
|
* Parent comment.
|
||||||
*/
|
*/
|
||||||
@Column(name = "parent_id", columnDefinition = "bigint default 0")
|
@Column(name = "parent_id", columnDefinition = "bigint default 0")
|
||||||
private Long parentId;
|
private Long parentId;
|
||||||
|
|
|
@ -30,38 +30,38 @@ public class Gallery extends BaseEntity {
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 图片名称
|
* Picture name.
|
||||||
*/
|
*/
|
||||||
@Column(name = "name", columnDefinition = "varchar(255) not null")
|
@Column(name = "name", columnDefinition = "varchar(255) not null")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 描述
|
* Picture description.
|
||||||
*/
|
*/
|
||||||
@Column(name = "description", columnDefinition = "varchar(255) default ''")
|
@Column(name = "description", columnDefinition = "varchar(255) default ''")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 拍摄时间/创作时间
|
* Shooting time / creation time.
|
||||||
*/
|
*/
|
||||||
@Column(name = "take_time", columnDefinition = "timestamp not null")
|
@Column(name = "take_time", columnDefinition = "timestamp not null")
|
||||||
@Temporal(TemporalType.TIMESTAMP)
|
@Temporal(TemporalType.TIMESTAMP)
|
||||||
private Date takeTime;
|
private Date takeTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 拍摄地点
|
* Picture location.
|
||||||
*/
|
*/
|
||||||
@Column(name = "location", columnDefinition = "varchar(255) default ''")
|
@Column(name = "location", columnDefinition = "varchar(255) default ''")
|
||||||
private String location;
|
private String location;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 缩略图
|
* Thumbnail
|
||||||
*/
|
*/
|
||||||
@Column(name = "thumbnail", columnDefinition = "varchar(1023) default ''")
|
@Column(name = "thumbnail", columnDefinition = "varchar(1023) default ''")
|
||||||
private String thumbnail;
|
private String thumbnail;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 图片地址
|
* Picture access path.
|
||||||
*/
|
*/
|
||||||
@Column(name = "url", columnDefinition = "varchar(1023) not null")
|
@Column(name = "url", columnDefinition = "varchar(1023) not null")
|
||||||
private String url;
|
private String url;
|
||||||
|
|
|
@ -29,31 +29,31 @@ public class Link extends BaseEntity {
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 友链名称
|
* Link name.
|
||||||
*/
|
*/
|
||||||
@Column(name = "name", columnDefinition = "varchar(255) not null")
|
@Column(name = "name", columnDefinition = "varchar(255) not null")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 友链地址
|
* Link website address.
|
||||||
*/
|
*/
|
||||||
@Column(name = "url", columnDefinition = "varchar(255) not null")
|
@Column(name = "url", columnDefinition = "varchar(255) not null")
|
||||||
private String url;
|
private String url;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 友链 Logo
|
* Website logo.
|
||||||
*/
|
*/
|
||||||
@Column(name = "logo", columnDefinition = "varchar(255) default ''")
|
@Column(name = "logo", columnDefinition = "varchar(255) default ''")
|
||||||
private String logo;
|
private String logo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 描述
|
* Website description.
|
||||||
*/
|
*/
|
||||||
@Column(name = "description", columnDefinition = "varchar(255) default ''")
|
@Column(name = "description", columnDefinition = "varchar(255) default ''")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分组
|
* Link group name.
|
||||||
*/
|
*/
|
||||||
@Column(name = "team", columnDefinition = "varchar(255) default ''")
|
@Column(name = "team", columnDefinition = "varchar(255) default ''")
|
||||||
private String team;
|
private String team;
|
||||||
|
|
|
@ -29,25 +29,25 @@ public class Log extends BaseEntity {
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 日志标识
|
* Log key.
|
||||||
*/
|
*/
|
||||||
@Column(name = "log_key", columnDefinition = "varchar(1023) default ''")
|
@Column(name = "log_key", columnDefinition = "varchar(1023) default ''")
|
||||||
private String logKey;
|
private String logKey;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 日志事件类型
|
* Log type.
|
||||||
*/
|
*/
|
||||||
@Column(name = "type", columnDefinition = "int not null")
|
@Column(name = "type", columnDefinition = "int not null")
|
||||||
private LogType type;
|
private LogType type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 日志内容
|
* Log content.
|
||||||
*/
|
*/
|
||||||
@Column(name = "content", columnDefinition = "varchar(1023) not null")
|
@Column(name = "content", columnDefinition = "varchar(1023) not null")
|
||||||
private String content;
|
private String content;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 操作 IP
|
* Operator's ip address.
|
||||||
*/
|
*/
|
||||||
@Column(name = "ip_address", columnDefinition = "varchar(127) default ''")
|
@Column(name = "ip_address", columnDefinition = "varchar(127) default ''")
|
||||||
private String ipAddress;
|
private String ipAddress;
|
||||||
|
|
|
@ -29,31 +29,31 @@ public class Menu extends BaseEntity {
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 菜单名称
|
* Menu name.
|
||||||
*/
|
*/
|
||||||
@Column(name = "name", columnDefinition = "varchar(255) not null")
|
@Column(name = "name", columnDefinition = "varchar(255) not null")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 菜单地址
|
* Menu access url.
|
||||||
*/
|
*/
|
||||||
@Column(name = "url", columnDefinition = "varchar(255) not null")
|
@Column(name = "url", columnDefinition = "varchar(255) not null")
|
||||||
private String url;
|
private String url;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 排序
|
* Sort.
|
||||||
*/
|
*/
|
||||||
@Column(name = "sort", columnDefinition = "int default 0")
|
@Column(name = "sort", columnDefinition = "int default 0")
|
||||||
private Integer sort;
|
private Integer sort;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 窗口打开方式
|
* Page opening method
|
||||||
*/
|
*/
|
||||||
@Column(name = "target", columnDefinition = "varchar(20) default '_self'")
|
@Column(name = "target", columnDefinition = "varchar(20) default '_self'")
|
||||||
private String target;
|
private String target;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 菜单图标
|
* Menu icon,Template support required.
|
||||||
*/
|
*/
|
||||||
@Column(name = "icon", columnDefinition = "varchar(50) default ''")
|
@Column(name = "icon", columnDefinition = "varchar(50) default ''")
|
||||||
private String icon;
|
private String icon;
|
||||||
|
|
|
@ -26,13 +26,13 @@ public class PostCategory extends BaseEntity {
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分类目录编号
|
* Category id.
|
||||||
*/
|
*/
|
||||||
@Column(name = "category_id")
|
@Column(name = "category_id")
|
||||||
private Integer categoryId;
|
private Integer categoryId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文章编号
|
* Post id.
|
||||||
*/
|
*/
|
||||||
@Column(name = "post_id")
|
@Column(name = "post_id")
|
||||||
private Integer postId;
|
private Integer postId;
|
||||||
|
|
|
@ -28,13 +28,13 @@ public class PostTag extends BaseEntity {
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文章编号
|
* Post id.
|
||||||
*/
|
*/
|
||||||
@Column(name = "post_id", columnDefinition = "int not null")
|
@Column(name = "post_id", columnDefinition = "int not null")
|
||||||
private Integer postId;
|
private Integer postId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 标签编号
|
* Tag id.
|
||||||
*/
|
*/
|
||||||
@Column(name = "tag_id", columnDefinition = "int not null")
|
@Column(name = "tag_id", columnDefinition = "int not null")
|
||||||
private Integer tagId;
|
private Integer tagId;
|
||||||
|
|
|
@ -29,13 +29,13 @@ public class Tag extends BaseEntity {
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 标签名
|
* Tag name.
|
||||||
*/
|
*/
|
||||||
@Column(name = "name", columnDefinition = "varchar(255) not null")
|
@Column(name = "name", columnDefinition = "varchar(255) not null")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 缩略名
|
* Tag slug name.
|
||||||
*/
|
*/
|
||||||
@Column(name = "slug_name", columnDefinition = "varchar(255) not null")
|
@Column(name = "slug_name", columnDefinition = "varchar(255) not null")
|
||||||
private String slugName;
|
private String slugName;
|
||||||
|
|
|
@ -31,37 +31,37 @@ public class User extends BaseEntity {
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户名
|
* User name.
|
||||||
*/
|
*/
|
||||||
@Column(name = "username", columnDefinition = "varchar(50) not null")
|
@Column(name = "username", columnDefinition = "varchar(50) not null")
|
||||||
private String username;
|
private String username;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 昵称
|
* User nick name,used to display on page.
|
||||||
*/
|
*/
|
||||||
@Column(name = "nickname", columnDefinition = "varchar(255) not null")
|
@Column(name = "nickname", columnDefinition = "varchar(255) not null")
|
||||||
private String nickname;
|
private String nickname;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 密码
|
* Password.
|
||||||
*/
|
*/
|
||||||
@Column(name = "password", columnDefinition = "varchar(255) not null")
|
@Column(name = "password", columnDefinition = "varchar(255) not null")
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 邮箱
|
* User email.
|
||||||
*/
|
*/
|
||||||
@Column(name = "email", columnDefinition = "varchar(127) default ''")
|
@Column(name = "email", columnDefinition = "varchar(127) default ''")
|
||||||
private String email;
|
private String email;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 头像
|
* User avatar.
|
||||||
*/
|
*/
|
||||||
@Column(name = "avatar", columnDefinition = "varchar(1023) default ''")
|
@Column(name = "avatar", columnDefinition = "varchar(1023) default ''")
|
||||||
private String avatar;
|
private String avatar;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 描述
|
* User description.
|
||||||
*/
|
*/
|
||||||
@Column(name = "description", columnDefinition = "varchar(1023) default ''")
|
@Column(name = "description", columnDefinition = "varchar(1023) default ''")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
|
@ -9,6 +9,8 @@ import java.io.IOException;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Freemarker custom tag of category.
|
||||||
|
*
|
||||||
* @author : RYAN0UP
|
* @author : RYAN0UP
|
||||||
* @date : 2019/3/22
|
* @date : 2019/3/22
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -9,6 +9,8 @@ import java.io.IOException;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Freemarker custom tag of comment.
|
||||||
|
*
|
||||||
* @author : RYAN0UP
|
* @author : RYAN0UP
|
||||||
* @date : 2019/3/22
|
* @date : 2019/3/22
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -9,6 +9,8 @@ import java.io.IOException;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Freemarker custom tag of link.
|
||||||
|
*
|
||||||
* @author : RYAN0UP
|
* @author : RYAN0UP
|
||||||
* @date : 2019/3/22
|
* @date : 2019/3/22
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -9,6 +9,8 @@ import java.io.IOException;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Freemarker custom tag of menu.
|
||||||
|
*
|
||||||
* @author : RYAN0UP
|
* @author : RYAN0UP
|
||||||
* @date : 2019/3/22
|
* @date : 2019/3/22
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -11,9 +11,7 @@ import java.io.IOException;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <pre>
|
* Freemarker custom tag of post.
|
||||||
* FreeMarker自定义标签
|
|
||||||
* </pre>
|
|
||||||
*
|
*
|
||||||
* @author : RYAN0UP
|
* @author : RYAN0UP
|
||||||
* @date : 2018/4/26
|
* @date : 2018/4/26
|
||||||
|
|
|
@ -9,6 +9,8 @@ import java.io.IOException;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Freemarker custom tag of tag.
|
||||||
|
*
|
||||||
* @author : RYAN0UP
|
* @author : RYAN0UP
|
||||||
* @date : 2019/3/22
|
* @date : 2019/3/22
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -19,26 +19,26 @@ import javax.validation.constraints.Size;
|
||||||
public class CategoryParam implements InputConverter<Category> {
|
public class CategoryParam implements InputConverter<Category> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分类名称
|
* Category name.
|
||||||
*/
|
*/
|
||||||
@NotBlank(message = "Category name must not be blank")
|
@NotBlank(message = "Category name must not be blank")
|
||||||
@Size(max = 50, message = "Length of category name must not be more than {max}")
|
@Size(max = 50, message = "Length of category name must not be more than {max}")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 缩略名
|
* Category slug name.
|
||||||
*/
|
*/
|
||||||
@Size(max = 50, message = "Length of category slug name must not be more than {max}")
|
@Size(max = 50, message = "Length of category slug name must not be more than {max}")
|
||||||
private String slugName;
|
private String slugName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 描述
|
* Category description.
|
||||||
*/
|
*/
|
||||||
@Size(max = 100, message = "Length of category description must not be more than {max}")
|
@Size(max = 100, message = "Length of category description must not be more than {max}")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上级目录
|
* Parent category.
|
||||||
*/
|
*/
|
||||||
private Integer parentId;
|
private Integer parentId;
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ public class HaloConst {
|
||||||
/**
|
/**
|
||||||
* version constant
|
* version constant
|
||||||
*/
|
*/
|
||||||
public static final String HALO_VERSION = "0.4.2";
|
public static final String HALO_VERSION = "1.0.0";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Token of header param
|
* Token of header param
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
<#-- 不允许修改该主题信息,也不能删除。 -->
|
<#-- 不允许修改该主题信息,也不能删除。 -->
|
||||||
<span>Designed by </span>
|
<span>Designed by </span>
|
||||||
<a href="https://www.caicai.me">CaiCai</a>
|
<a href="https://www.caicai.me">CaiCai</a>
|
||||||
<#-- 虽然Halo使用了宽松的GPL协议,但开发不易,希望您可以保留一下版权声明。笔芯~ -->
|
|
||||||
<div class="by_halo">
|
<div class="by_halo">
|
||||||
<a href="https://github.com/halo-dev/halo" target="_blank">Proudly published with Halo!</a>
|
<a href="https://github.com/halo-dev/halo" target="_blank">Proudly published with Halo!</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue