package com.bofeng.entity;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import lombok.Getter;
import lombok.Setter;
import org.joda.time.DateTime;

import java.math.BigDecimal;

@Getter
@Setter
@TableName("tb_order")
public class Order {

    @TableId("order_id")
    private Long orderId;

    @TableField("room_id")
    private Long roomId;

    @TableField("room_name")
    private String roomName;

    @TableField("place_id")
    private Long placeId;

    @TableField("place_name")
    private String placeName;

    @TableField("customer_name")
    private String customerName;

    @TableField("customer_tel")
    private String customerTel;

    @TableField("customer_number")
    private Long customerNumber;

    @TableField("sale_name")
    private String saleName;

    @TableField("sale_user_id")
    private Long saleUserId;

    @TableField("arrival_at")
    private DateTime arrivalAt;

    @TableField("pay_at")
    private DateTime payAt;

    @TableField("pay_amount")
    private BigDecimal payAmount;

    @TableField("paid")
    private Boolean paid;

    @TableField("update_at")
    private DateTime updateAt;

    //冗余字段，来源于 order_cms 表
    @TableField(exist = false)
    private BigDecimal cmsAmount;

    //冗余字段，来源于 user 表
    @TableField(exist = false)
    private String salePhone;

    //冗余字段，来源于 room 表, 标记订单能否由销售修改
    @TableField(exist = false)
    private String beUse;
}
