package io.jpress.model;

import io.jboot.db.annotation.Table;
import io.jpress.commons.utils.CommonsUtils;
import io.jpress.model.base.BaseUserOrderInvoice;

/**
 * Generated by JPress.
 */
@Table(tableName = "user_order_invoice", primaryKey = "id")
public class UserOrderInvoice extends BaseUserOrderInvoice<UserOrderInvoice> {

    private static final long serialVersionUID = 1L;

    public static final int INVOICE_STATUS_NOT_APPLY = 1; //未申请发票
    public static final int INVOICE_STATUS_APPLYING = 2;//发票申请中
    public static final int INVOICE_STATUS_INVOICING = 3;//发票开具中
    public static final int INVOICE_STATUS_NONEED = 8;//无需开具发票
    public static final int INVOICE_STATUS_INVOICED = 9; //发票已经开具

    public static String TYPE_COMPANY = "company";
    public static String TYPE_PERSONAL = "personal";

    @Override
    public boolean save() {
        CommonsUtils.escapeModel(this, "options");
        return super.save();
    }

    @Override
    public boolean update() {
        CommonsUtils.escapeModel(this, "options");
        return super.update();
    }
}
