@Readonly
@Comment("商品图片")
private List<ProductImage> images;
ProductImage类外键指向product类,可以不写@many和@one吗
@Readonly
@Comment("商品图片")
private List<ProductImage> images;
ProductImage类外键指向product类,可以不写@many和@one吗
/**
* 商品审核
*
* @author Longitude
*
*/
@Data
@Comment("商品表")
@Table("dg_goods_shelve")
@View("v_dg_goods_shelve")
public class Product {
@Comment("ID")
@Id
private Long id;
@Comment("名称")
@Name
@Column("name")
private String name;
@Readonly
@Comment("商品图片")
private List<ProductImage> images;
}
/**
* 商品图片
* @author Longitude
*
*/
@Data
@Comment("商品图片")
@Table("dg_goods_image")
public class ProductImage {
@Comment("所属商品")
@Column("goods_shelve")
private Long goodsShelve;
@Comment("大图")
@Column("large")
private String large;
@Comment("中图")
@Column("medium")
private String medium;
@Comment("小图")
@Column("thumbnail")
private String thumbnail;
@Comment("原图")
@Column("source")
private String source;
}
@wendal 为啥ajax查询product类 的返回值可以查出res.images的值呢