package com.yonge.cooleshow.biz.dal.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yonge.cooleshow.biz.dal.enums.GoodTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 平台订单表
 */
@Getter
@Setter
@TableName("user_order_detail")
@ApiModel(value = "UserOrderDetail对象", description = "平台订单表")
public class UserOrderDetail implements Serializable {
	private static final long serialVersionUID = 1L;
    @TableId(value = "id_", type = IdType.AUTO)
    private Long id;
    @ApiModelProperty("订单号 ")
	@TableField(value = "order_no_")
    private String orderNo;
    @ApiModelProperty("订单详情号 ")
    @TableField(value = "sub_order_no_")
    private String subOrderNo;
    @ApiModelProperty("卖家id ")
    @TableField(value = "merch_id_")
    private Long merchId;
    @ApiModelProperty("订单类型: 学生端（ VIP、开通会员  PRACTICE、趣纠课购买  LIVE、直播课购买 VIDEO、视频课购买 MUSIC、单曲点播 ACTI_REGIST、活动报名） 老师端（VIP、开通会员 PIANO_ROOM、琴房时长）")
    @TableField(value = "good_type_")
    private GoodTypeEnum goodType;
    @ApiModelProperty("业务id ")
	@TableField(value = "biz_id_")
    private Long bizId;
    @ApiModelProperty("业务内容 ")
	@TableField(value = "biz_content_")
    private String bizContent;
    @ApiModelProperty("商品名称 ")
    @TableField(value = "good_name_")
    private String goodName;
    @ApiModelProperty("商品图片 ")
    @TableField(value = "good_url_")
    private String goodUrl;
    @ApiModelProperty("原价 ")
    @TableField(value = "original_price_")
    private BigDecimal originalPrice;
    @ApiModelProperty("预计价格 ")
    @TableField(value = "expect_price_")
    private BigDecimal expectPrice;
    @ApiModelProperty("实际价格 ")
    @TableField(value = "actual_price_")
    private BigDecimal actualPrice;
    @ApiModelProperty("优惠金额 ")
    @TableField(value = "coupon_amount_")
    private BigDecimal couponAmount;
    @ApiModelProperty("商品数量 ")
    @TableField(value = "good_num_")
    private Integer goodNum;
    @ApiModelProperty("商品单价 ")
    @TableField(value = "good_price_")
    private BigDecimal goodPrice;
    @ApiModelProperty("平台服务费 ")
    @TableField(value = "plantform_fee_")
    private BigDecimal plantformFee;
    @ApiModelProperty("平台服务费比例% ")
    @TableField(value = "plantform_fee_rate_")
    private BigDecimal plantformFeeRate;

    @TableField(value = "account_config_")
    private String accountConfig;

    @ApiModelProperty("优惠json")
    @TableField(value = "discount_json_")
    private String discountJson;

    @ApiModelProperty("下单时间 ")
	@TableField(value = "create_time_")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createTime;
	@TableField(value = "update_time_")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date updateTime;


    @ApiModelProperty("学生购买机构专辑时的小组ID")
    @TableField(value = "tenant_group_album_id_")
    private Long tenantGroupAlbumId;


    @ApiModelProperty("业务数据")
    @TableField(value = "biz_json_")
    private String bizJson;


    @ApiModelProperty("是否赠送商品")
    @TableField(value = "gift_flag_")
    private Boolean giftFlag;

}