1. package com.cedric.domain;
    2. import javax.persistence.*;
    3. /**
    4. * 1.实体类和表的映射关系
    5. * @Entity
    6. * @Table
    7. * 2.类中属性和表中字段的映射关系
    8. * @Id
    9. * @GeneratedValue
    10. * @Column
    11. */
    12. @Entity
    13. @Table(name = "cst_customer")
    14. public class Customer {
    15. @Id
    16. @GeneratedValue(strategy = GenerationType.IDENTITY)
    17. @Column(name = "cust_id")
    18. private Long custId;
    19. @Column(name = "cust_address")
    20. private String custAddress;
    21. @Column(name = "cust_industry")
    22. private String custIndustry;
    23. @Column(name = "cust_level")
    24. private String custLevel;
    25. @Column(name = "cust_name")
    26. private String custName;
    27. @Column(name = "cust_phone")
    28. private String custPhone;
    29. @Column(name = "cust_source")
    30. private String custSource;
    31. // set and get
    32. // toString