调整包结构,规范entity注解
This commit is contained in:
@ -1,73 +1,74 @@
|
||||
package co.yixiang.tools.domain;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Entity
|
||||
|
||||
@Data
|
||||
@Table(name="alipay_config")
|
||||
@TableName("alipay_config")
|
||||
public class AlipayConfig implements Serializable {
|
||||
|
||||
/** 主键 */
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id")
|
||||
@TableId
|
||||
//@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
// @Column(name = "id")
|
||||
private Long id;
|
||||
|
||||
|
||||
/** 应用ID */
|
||||
@Column(name = "app_id")
|
||||
// @Column(name = "app_id")
|
||||
private String appId;
|
||||
|
||||
|
||||
/** 编码 */
|
||||
@Column(name = "charset")
|
||||
// @Column(name = "charset")
|
||||
private String charset;
|
||||
|
||||
|
||||
/** 类型 固定格式json */
|
||||
@Column(name = "format")
|
||||
// @Column(name = "format")
|
||||
private String format;
|
||||
|
||||
|
||||
/** 网关地址 */
|
||||
@Column(name = "gateway_url")
|
||||
// @Column(name = "gateway_url")
|
||||
private String gatewayUrl;
|
||||
|
||||
|
||||
/** 异步回调 */
|
||||
@Column(name = "notify_url")
|
||||
// @Column(name = "notify_url")
|
||||
private String notifyUrl;
|
||||
|
||||
|
||||
/** 私钥 */
|
||||
@Column(name = "private_key")
|
||||
// @Column(name = "private_key")
|
||||
private String privateKey;
|
||||
|
||||
|
||||
/** 公钥 */
|
||||
@Column(name = "public_key")
|
||||
// @Column(name = "public_key")
|
||||
private String publicKey;
|
||||
|
||||
|
||||
/** 回调地址 */
|
||||
@Column(name = "return_url")
|
||||
// @Column(name = "return_url")
|
||||
private String returnUrl;
|
||||
|
||||
|
||||
/** 签名方式 */
|
||||
@Column(name = "sign_type")
|
||||
// @Column(name = "sign_type")
|
||||
private String signType;
|
||||
|
||||
|
||||
/** 商户号 */
|
||||
@Column(name = "sys_service_provider_id")
|
||||
// @Column(name = "sys_service_provider_id")
|
||||
private String sysServiceProviderId;
|
||||
|
||||
|
||||
|
@ -1,4 +1,6 @@
|
||||
package co.yixiang.tools.domain;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
@ -9,40 +11,40 @@ import java.io.Serializable;
|
||||
* @author hupeng
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Entity
|
||||
|
||||
@Data
|
||||
@Table(name="email_config")
|
||||
@TableName("email_config")
|
||||
public class EmailConfig implements Serializable {
|
||||
|
||||
/** ID */
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id")
|
||||
@TableId
|
||||
//@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
// @Column(name = "id")
|
||||
private Long id;
|
||||
|
||||
|
||||
/** 收件人 */
|
||||
@Column(name = "from_user")
|
||||
// @Column(name = "from_user")
|
||||
private String fromUser;
|
||||
|
||||
|
||||
/** 邮件服务器SMTP地址 */
|
||||
@Column(name = "host")
|
||||
// @Column(name = "host")
|
||||
private String host;
|
||||
|
||||
|
||||
/** 密码 */
|
||||
@Column(name = "pass")
|
||||
// @Column(name = "pass")
|
||||
private String pass;
|
||||
|
||||
|
||||
/** 端口 */
|
||||
@Column(name = "port")
|
||||
// @Column(name = "port")
|
||||
private String port;
|
||||
|
||||
|
||||
/** 发件者用户名 */
|
||||
@Column(name = "user")
|
||||
// @Column(name = "user")
|
||||
private String user;
|
||||
|
||||
|
||||
|
@ -1,4 +1,6 @@
|
||||
package co.yixiang.tools.domain;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
@ -12,54 +14,54 @@ import java.io.Serializable;
|
||||
* @author hupeng
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Entity
|
||||
|
||||
@Data
|
||||
@Table(name="local_storage")
|
||||
@TableName("local_storage")
|
||||
public class LocalStorage implements Serializable {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id")
|
||||
@TableId
|
||||
//@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
// @Column(name = "id")
|
||||
private Long id;
|
||||
|
||||
|
||||
/** 文件真实的名称 */
|
||||
@Column(name = "real_name")
|
||||
// @Column(name = "real_name")
|
||||
private String realName;
|
||||
|
||||
|
||||
/** 文件名 */
|
||||
@Column(name = "name")
|
||||
// @Column(name = "name")
|
||||
private String name;
|
||||
|
||||
|
||||
/** 后缀 */
|
||||
@Column(name = "suffix")
|
||||
// @Column(name = "suffix")
|
||||
private String suffix;
|
||||
|
||||
|
||||
/** 路径 */
|
||||
@Column(name = "path")
|
||||
// @Column(name = "path")
|
||||
private String path;
|
||||
|
||||
|
||||
/** 类型 */
|
||||
@Column(name = "type")
|
||||
// @Column(name = "type")
|
||||
private String type;
|
||||
|
||||
|
||||
/** 大小 */
|
||||
@Column(name = "size")
|
||||
// @Column(name = "size")
|
||||
private String size;
|
||||
|
||||
|
||||
/** 操作人 */
|
||||
@Column(name = "operate")
|
||||
// @Column(name = "operate")
|
||||
private String operate;
|
||||
|
||||
|
||||
/** 创建日期 */
|
||||
@Column(name = "create_time")
|
||||
// @Column(name = "create_time")
|
||||
@TableField(fill= FieldFill.INSERT)
|
||||
private Timestamp createTime;
|
||||
public LocalStorage(String realName,String name, String suffix, String path, String type, String size, String operate) {
|
||||
|
@ -1,4 +1,6 @@
|
||||
package co.yixiang.tools.domain;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
@ -12,61 +14,61 @@ import java.io.Serializable;
|
||||
* @author hupeng
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Entity
|
||||
|
||||
@Data
|
||||
@Table(name="picture")
|
||||
@TableName("picture")
|
||||
public class Picture implements Serializable {
|
||||
|
||||
/** ID */
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id")
|
||||
@TableId
|
||||
//@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
// @Column(name = "id")
|
||||
private Long id;
|
||||
|
||||
|
||||
/** 上传日期 */
|
||||
@Column(name = "create_time")
|
||||
// @Column(name = "create_time")
|
||||
@TableField(fill= FieldFill.INSERT)
|
||||
private Timestamp createTime;
|
||||
|
||||
|
||||
/** 删除的URL */
|
||||
@Column(name = "delete_url")
|
||||
// @Column(name = "delete_url")
|
||||
private String deleteUrl;
|
||||
|
||||
|
||||
/** 图片名称 */
|
||||
@Column(name = "filename")
|
||||
// @Column(name = "filename")
|
||||
private String filename;
|
||||
|
||||
|
||||
/** 图片高度 */
|
||||
@Column(name = "height")
|
||||
// @Column(name = "height")
|
||||
private String height;
|
||||
|
||||
|
||||
/** 图片大小 */
|
||||
@Column(name = "size")
|
||||
// @Column(name = "size")
|
||||
private String size;
|
||||
|
||||
|
||||
/** 图片地址 */
|
||||
@Column(name = "url")
|
||||
// @Column(name = "url")
|
||||
private String url;
|
||||
|
||||
|
||||
/** 用户名称 */
|
||||
@Column(name = "username")
|
||||
// @Column(name = "username")
|
||||
private String username;
|
||||
|
||||
|
||||
/** 图片宽度 */
|
||||
@Column(name = "width")
|
||||
// @Column(name = "width")
|
||||
private String width;
|
||||
|
||||
|
||||
/** 文件的MD5值 */
|
||||
@Column(name = "md5code")
|
||||
// @Column(name = "md5code")
|
||||
private String md5code;
|
||||
|
||||
public void copy(Picture source){
|
||||
|
@ -1,4 +1,6 @@
|
||||
package co.yixiang.tools.domain;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
@ -10,46 +12,46 @@ import java.io.Serializable;
|
||||
* @author hupeng
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Entity
|
||||
|
||||
@Data
|
||||
@Table(name="qiniu_config")
|
||||
@TableName("qiniu_config")
|
||||
public class QiniuConfig implements Serializable {
|
||||
|
||||
/** ID */
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id")
|
||||
@TableId
|
||||
//@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
// @Column(name = "id")
|
||||
private Long id;
|
||||
|
||||
|
||||
/** accessKey */
|
||||
@Column(name = "access_key")
|
||||
// @Column(name = "access_key")
|
||||
private String accessKey;
|
||||
|
||||
|
||||
/** Bucket 识别符 */
|
||||
@Column(name = "bucket")
|
||||
// @Column(name = "bucket")
|
||||
private String bucket;
|
||||
|
||||
|
||||
/** 外链域名 */
|
||||
@Column(name = "host",nullable = false)
|
||||
// @Column(name = "host",nullable = false)
|
||||
@NotBlank
|
||||
private String host;
|
||||
|
||||
|
||||
/** secretKey */
|
||||
@Column(name = "secret_key")
|
||||
// @Column(name = "secret_key")
|
||||
private String secretKey;
|
||||
|
||||
|
||||
/** 空间类型 */
|
||||
@Column(name = "type")
|
||||
// @Column(name = "type")
|
||||
private String type;
|
||||
|
||||
|
||||
/** 机房 */
|
||||
@Column(name = "zone")
|
||||
// @Column(name = "zone")
|
||||
private String zone;
|
||||
|
||||
|
||||
|
@ -1,4 +1,6 @@
|
||||
package co.yixiang.tools.domain;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
@ -12,50 +14,50 @@ import java.io.Serializable;
|
||||
* @author hupeng
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Entity
|
||||
|
||||
@Data
|
||||
@Table(name="qiniu_content")
|
||||
@TableName("qiniu_content")
|
||||
public class QiniuContent implements Serializable {
|
||||
|
||||
/** ID */
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id")
|
||||
@TableId
|
||||
//@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
// @Column(name = "id")
|
||||
private Long id;
|
||||
|
||||
|
||||
/** Bucket 识别符 */
|
||||
@Column(name = "bucket")
|
||||
// @Column(name = "bucket")
|
||||
private String bucket;
|
||||
|
||||
|
||||
/** 文件名称 */
|
||||
@Column(name = "name")
|
||||
// @Column(name = "name")
|
||||
private String name;
|
||||
|
||||
|
||||
/** 文件大小 */
|
||||
@Column(name = "size")
|
||||
// @Column(name = "size")
|
||||
private String size;
|
||||
|
||||
|
||||
/** 文件类型:私有或公开 */
|
||||
@Column(name = "type")
|
||||
// @Column(name = "type")
|
||||
private String type;
|
||||
|
||||
|
||||
/** 上传或同步的时间 */
|
||||
@Column(name = "update_time")
|
||||
// @Column(name = "update_time")
|
||||
@TableField(fill= FieldFill.INSERT_UPDATE)
|
||||
private Timestamp updateTime;
|
||||
|
||||
|
||||
/** 文件url */
|
||||
@Column(name = "url")
|
||||
// @Column(name = "url")
|
||||
private String url;
|
||||
|
||||
|
||||
@Column(name = "suffix")
|
||||
// @Column(name = "suffix")
|
||||
private String suffix;
|
||||
|
||||
|
||||
|
@ -1,11 +1,12 @@
|
||||
package co.yixiang.tools.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.hibernate.annotations.CreationTimestamp;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.io.Serializable;
|
||||
import java.sql.Timestamp;
|
||||
@ -15,14 +16,13 @@ import java.sql.Timestamp;
|
||||
* @date 2018-12-26
|
||||
*/
|
||||
@Data
|
||||
@Entity
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Table(name = "verification_code")
|
||||
@TableName("verification_code")
|
||||
public class VerificationCode implements Serializable {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@TableId
|
||||
//@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
private String code;
|
||||
@ -34,16 +34,14 @@ public class VerificationCode implements Serializable {
|
||||
private Boolean status = true;
|
||||
|
||||
/** 类型 :phone 和 email */
|
||||
@NotBlank
|
||||
private String type;
|
||||
|
||||
/** 具体的phone与email */
|
||||
@NotBlank
|
||||
private String value;
|
||||
|
||||
/** 创建日期 */
|
||||
@CreationTimestamp
|
||||
@Column(name = "create_time")
|
||||
// @Column(name = "create_time")
|
||||
private Timestamp createTime;
|
||||
|
||||
public VerificationCode(String code, String scenes, @NotBlank String type, @NotBlank String value) {
|
||||
|
@ -1,20 +0,0 @@
|
||||
package co.yixiang.tools.repository;
|
||||
|
||||
import co.yixiang.tools.domain.VerificationCode;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
/**
|
||||
* @author Zheng Jie
|
||||
* @date 2018-12-26
|
||||
*/
|
||||
public interface VerificationCodeRepository extends JpaRepository<VerificationCode, Long> {
|
||||
|
||||
/**
|
||||
* 获取有效的验证码
|
||||
* @param scenes 业务场景,如重置密码,重置邮箱等等
|
||||
* @param type 类型
|
||||
* @param value 值
|
||||
* @return VerificationCode
|
||||
*/
|
||||
VerificationCode findByScenesAndTypeAndValueAndStatusIsTrue(String scenes, String type, String value);
|
||||
}
|
Reference in New Issue
Block a user