package com.cyksj.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 
 * @TableName advertisement_order_don
 */
@TableName(value ="advertisement_order_don")
@Data
@Accessors(chain = true)
public class AdvertisementOrderDon extends BaseEntity implements Serializable {
    /**
     * 
     */
    private Long popularizeId;

    /**
     * 
     */
    private Long userId;

    /**
     * 
     */
    private String openId;

    /**
     * 订单号
     */
    private String orderNo;

    /**
     * 支付订单id
     */
    private String transactionId;

    /**
     * 
     */
    private BigDecimal money;

    /**
     * 来源
     */
    private Source source;

    /**
     * 
     */
    private Status status;

    private Date payTime;


    public enum Status {
        /**
         * 订单状态
         */
        noPayment("待付款"),
        hasPayment("已付款");

        private String desc;

        Status(String desc) {
            this.desc = desc;
        }

        public String getDesc() {
            return desc;
        }
    }

    public enum Source{

        WeChat("微信"),
        H5("h5"),
        ALI_PAY("支付宝"),
        Mini_Program("小程序"),
        unknown("unknown");

        private String desc;

        Source(String desc){
            this.desc = desc;
        }

    }

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}