package com.rf.psychological.douyin.model;

import com.rf.psychological.base.model.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @Description:抖音订单
 * @Author: mimang
 * @Date: 2023/8/17
 */
@ConditionalOnProperty(prefix="douyin",name = "isDouYin", havingValue = "true")
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper=false)
@Table(name = "t_douyin_order_info")
@org.hibernate.annotations.Table(appliesTo = "t_douyin_order_info", comment = "抖音订单信息表")
@DynamicUpdate(value = true)
public class DouYinOrderEntity extends BaseEntity {

    @Column(name = "subject", columnDefinition = "varchar(100) comment '商品描述'")
    private String subject;

    @Column(name = "body", columnDefinition = "varchar(100) comment '商品详情 '")
    private String body;

    @Column(name = "out_order_no", columnDefinition = "varchar(50) comment '商户订单编号'")
    private String outOrderNo;//商户订单编号

    @Column(name = "result_id", columnDefinition = "varchar(36) comment '报告结果id'")
    private String resultId;//报告结果id

    @Column(name = "total_amount", columnDefinition = "int(11) comment '支付价格(分)'")
    private Integer totalAmount;//订单金额(分)

    @Column(name = "order_id", columnDefinition = "varchar(128) comment '抖音侧唯一订单号'")
    private String orderId;

    @Column(name = "order_token", columnDefinition = "varchar(200) comment '签名后的订单信息'")
    private String orderToken;

    @Column(name = "order_status", columnDefinition = "varchar(20) comment '订单状态'")
    private String orderStatus;//订单状态

    @Column(name = "create_time", columnDefinition = "varchar(20) comment '创建时间'")
    private String createTime;//创建时间

    @Column(name = "update_time", columnDefinition = "varchar(20) comment '更新时间'")
    private String updateTime;//更新时间
}
