package com.uas.finance.model;

import javax.persistence.*;
import java.io.Serializable;

/**
 * created by shicr on 2018/1/16
 * 基础合同信息表
 **/
@Entity
@Table(name = "fasale")
public class FsSale implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long id;

    /**
     * 出账id
     */
    @Column(name = "aa_id")
    private Long aa_id;

    /**
     * 基础合同编号
     */
    @Column(name = "sa_contractno")
    private String sa_contractno;

    /**
     * 合同金额
     */
    @Column(name = "sa_contractamount")
    private Double sa_contractamount;

    /**
     * 订单编号
     */
    @Column(name = "sa_code")
    private String sa_code;

    /**
     * 订单金额
     */
    @Column(name = "sa_total")
    private Double sa_total;

    /**
     * 收款方式
     */
    @Column(name = "sa_payment")
    private String sa_payment;

    @ManyToOne(cascade = CascadeType.REFRESH)
    @JoinColumn(name = "aa_id",insertable = false,updatable = false)
    private AccountApply accountApply;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getAa_id() {
        return aa_id;
    }

    public void setAa_id(Long aa_id) {
        this.aa_id = aa_id;
    }

    public String getSa_contractno() {
        return sa_contractno;
    }

    public void setSa_contractno(String sa_contractno) {
        this.sa_contractno = sa_contractno;
    }

    public Double getSa_contractamount() {
        return sa_contractamount;
    }

    public void setSa_contractamount(Double sa_contractamount) {
        this.sa_contractamount = sa_contractamount;
    }

    public String getSa_code() {
        return sa_code;
    }

    public void setSa_code(String sa_code) {
        this.sa_code = sa_code;
    }

    public Double getSa_total() {
        return sa_total;
    }

    public void setSa_total(Double sa_total) {
        this.sa_total = sa_total;
    }

    public String getSa_payment() {
        return sa_payment;
    }

    public void setSa_payment(String sa_payment) {
        this.sa_payment = sa_payment;
    }

  /*  public AccountApply getAccountApply() {
        return accountApply;
    }

    public void setAccountApply(AccountApply accountApply) {
        this.accountApply = accountApply;
    }*/
}
