// Path: src/main/java/love/sola/netsupport/enums/Status.java
// public class Status {
// 
//     public static final int UNCHECKED = 0;
//     public static final int ARRANGED = 1;
//     public static final int PUTOFF = 2;
//     public static final int REPORTED = 4;
//     public static final int ISP_HANDLED = 7;
//     public static final int SOLVED = 9;
// 
//     public static final Map<Integer, String> inverseMap = new HashMap<>();
// 
//     static {
//         System.out.println("Loading Status...");
//         for (Field field : Status.class.getDeclaredFields()) {
//             if (field.getType().isAssignableFrom(Integer.TYPE)) {
//                 try {
//                     inverseMap.put((Integer) field.get(null), field.getName());
//                 } catch (IllegalAccessException e) {
//                     e.printStackTrace();
//                 }
//             }
//         }
//     }
// 
//     public static String getLocalized(int status) {
//         if (inverseMap.containsKey(status)) {
//             return lang("STATUS_" + inverseMap.get(status));
//         }
//         return null;
//     }
// 
// }
// 
// Path: src/main/java/love/sola/netsupport/pojo/Ticket.java
// @Entity
// @Table(name = "tickets")
// @Audited(targetAuditMode = RelationTargetAuditMode.NOT_AUDITED)
// public class Ticket {
// 
//     public static final String PROPERTY_USER = "user";
//     public static final String PROPERTY_STATUS = "status";
//     public static final String PROPERTY_SUBMIT_TIME = "submitTime";
// 
//     @Id
//     @GeneratedValue(strategy = GenerationType.IDENTITY)
//     private Integer id;
//     @ManyToOne(optional = false)
//     @JoinColumn(name = TableTicket.COLUMN_SID)
//     private User user;
//     private String description;
//     @Column(name = TableTicket.COLUMN_SUBMIT_TIME, insertable = false, updatable = false)
//     private Date submitTime;
//     private String remark;
//     private Date updateTime;
//     @ManyToOne
//     @JoinColumn(name = TableTicket.COLUMN_OPSID)
//     private Operator operator;
//     private Integer status;
// 
//     public Ticket() {
//     }
// 
//     public Ticket(User user, String description, Date submitTime, String remark, Date updateTime, Operator operator, Integer status) {
//         this.user = user;
//         this.description = description;
//         this.submitTime = submitTime;
//         this.remark = remark;
//         this.updateTime = updateTime;
//         this.operator = operator;
//         this.status = status;
//     }
// 
//     public Integer getId() {
//         return id;
//     }
// 
//     public void setId(Integer id) {
//         this.id = id;
//     }
// 
//     public User getUser() {
//         return user;
//     }
// 
//     public void setUser(User user) {
//         this.user = user;
//     }
// 
//     public String getDescription() {
//         return description;
//     }
// 
//     public void setDescription(String description) {
//         this.description = description;
//     }
// 
//     public Date getSubmitTime() {
//         return submitTime;
//     }
// 
//     public void setSubmitTime(Date submitTime) {
//         this.submitTime = submitTime;
//     }
// 
//     public String getRemark() {
//         return remark;
//     }
// 
//     public void setRemark(String remark) {
//         this.remark = remark;
//     }
// 
//     public Date getUpdateTime() {
//         return updateTime;
//     }
// 
//     public void setUpdateTime(Date updateTime) {
//         this.updateTime = updateTime;
//     }
// 
//     public Operator getOperator() {
//         return operator;
//     }
// 
//     public void setOperator(Operator operator) {
//         this.operator = operator;
//     }
// 
//     public Integer getStatus() {
//         return status;
//     }
// 
//     public void setStatus(Integer status) {
//         this.status = status;
//     }
// 
//     @Override
//     public String toString() {
//         return "Ticket{" +
//                 "id=" + id +
//                 ", user=" + user +
//                 ", description='" + description + '\'' +
//                 ", submitTime=" + submitTime +
//                 ", remark='" + remark + '\'' +
//                 ", updateTime=" + updateTime +
//                 ", operator=" + operator +
//                 ", status=" + status +
//                 '}';
//     }
// }
// 
// Path: src/main/java/love/sola/netsupport/config/Lang.java
// public static String lang(String key) {
//     String value = messages.get(key);
//     return value == null ? "!!" + key + "!!" : value;
// }


import static love.sola.netsupport.config.Lang.lang;
import java.text.SimpleDateFormat;
import love.sola.netsupport.enums.Status;
import love.sola.netsupport.pojo.Ticket;
/*
 * This file is part of WechatTicketSystem.
 *
 * WechatTicketSystem is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * WechatTicketSystem is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with WechatTicketSystem.  If not, see <http://www.gnu.org/licenses/>.
 */

package love.sola.netsupport.util;




/**
 * @author Sola {@literal <dev@sola.love>}
 */
public class ParseUtil {

    public static SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm EEE");

    public static String parseTicket(Ticket t) {
        StringBuilder sb = new StringBuilder()
                .append(lang("Ticket_Info_Id")).append(t.getId()).append("\n")
// Path: src/main/java/love/sola/netsupport/enums/Status.java
// public class Status {
// 
//     public static final int UNCHECKED = 0;
//     public static final int ARRANGED = 1;
//     public static final int PUTOFF = 2;
//     public static final int REPORTED = 4;
//     public static final int ISP_HANDLED = 7;
//     public static final int SOLVED = 9;
// 
//     public static final Map<Integer, String> inverseMap = new HashMap<>();
// 
//     static {
//         System.out.println("Loading Status...");
//         for (Field field : Status.class.getDeclaredFields()) {
//             if (field.getType().isAssignableFrom(Integer.TYPE)) {
//                 try {
//                     inverseMap.put((Integer) field.get(null), field.getName());
//                 } catch (IllegalAccessException e) {
//                     e.printStackTrace();
//                 }
//             }
//         }
//     }
// 
//     public static String getLocalized(int status) {
//         if (inverseMap.containsKey(status)) {
//             return lang("STATUS_" + inverseMap.get(status));
//         }
//         return null;
//     }
// 
// }
// 
// Path: src/main/java/love/sola/netsupport/pojo/Ticket.java
// @Entity
// @Table(name = "tickets")
// @Audited(targetAuditMode = RelationTargetAuditMode.NOT_AUDITED)
// public class Ticket {
// 
//     public static final String PROPERTY_USER = "user";
//     public static final String PROPERTY_STATUS = "status";
//     public static final String PROPERTY_SUBMIT_TIME = "submitTime";
// 
//     @Id
//     @GeneratedValue(strategy = GenerationType.IDENTITY)
//     private Integer id;
//     @ManyToOne(optional = false)
//     @JoinColumn(name = TableTicket.COLUMN_SID)
//     private User user;
//     private String description;
//     @Column(name = TableTicket.COLUMN_SUBMIT_TIME, insertable = false, updatable = false)
//     private Date submitTime;
//     private String remark;
//     private Date updateTime;
//     @ManyToOne
//     @JoinColumn(name = TableTicket.COLUMN_OPSID)
//     private Operator operator;
//     private Integer status;
// 
//     public Ticket() {
//     }
// 
//     public Ticket(User user, String description, Date submitTime, String remark, Date updateTime, Operator operator, Integer status) {
//         this.user = user;
//         this.description = description;
//         this.submitTime = submitTime;
//         this.remark = remark;
//         this.updateTime = updateTime;
//         this.operator = operator;
//         this.status = status;
//     }
// 
//     public Integer getId() {
//         return id;
//     }
// 
//     public void setId(Integer id) {
//         this.id = id;
//     }
// 
//     public User getUser() {
//         return user;
//     }
// 
//     public void setUser(User user) {
//         this.user = user;
//     }
// 
//     public String getDescription() {
//         return description;
//     }
// 
//     public void setDescription(String description) {
//         this.description = description;
//     }
// 
//     public Date getSubmitTime() {
//         return submitTime;
//     }
// 
//     public void setSubmitTime(Date submitTime) {
//         this.submitTime = submitTime;
//     }
// 
//     public String getRemark() {
//         return remark;
//     }
// 
//     public void setRemark(String remark) {
//         this.remark = remark;
//     }
// 
//     public Date getUpdateTime() {
//         return updateTime;
//     }
// 
//     public void setUpdateTime(Date updateTime) {
//         this.updateTime = updateTime;
//     }
// 
//     public Operator getOperator() {
//         return operator;
//     }
// 
//     public void setOperator(Operator operator) {
//         this.operator = operator;
//     }
// 
//     public Integer getStatus() {
//         return status;
//     }
// 
//     public void setStatus(Integer status) {
//         this.status = status;
//     }
// 
//     @Override
//     public String toString() {
//         return "Ticket{" +
//                 "id=" + id +
//                 ", user=" + user +
//                 ", description='" + description + '\'' +
//                 ", submitTime=" + submitTime +
//                 ", remark='" + remark + '\'' +
//                 ", updateTime=" + updateTime +
//                 ", operator=" + operator +
//                 ", status=" + status +
//                 '}';
//     }
// }
// 
// Path: src/main/java/love/sola/netsupport/config/Lang.java
// public static String lang(String key) {
//     String value = messages.get(key);
//     return value == null ? "!!" + key + "!!" : value;
// }


// Path: src/main/java/love/sola/netsupport/util/ParseUtil.java
import static love.sola.netsupport.config.Lang.lang;
import java.text.SimpleDateFormat;
import love.sola.netsupport.enums.Status;
import love.sola.netsupport.pojo.Ticket;

/*
 * This file is part of WechatTicketSystem.
 *
 * WechatTicketSystem is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * WechatTicketSystem is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with WechatTicketSystem.  If not, see <http://www.gnu.org/licenses/>.
 */

package love.sola.netsupport.util;




/**
 * @author Sola {@literal <dev@sola.love>}
 */
public class ParseUtil {

    public static SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm EEE");

    public static String parseTicket(Ticket t) {
        StringBuilder sb = new StringBuilder()
                .append(lang("Ticket_Info_Id")).append(t.getId()).append("\n")
                .append(lang("Ticket_Info_Desc")).append(t.getDescription()).append("\n")