wangrong
2021-11-24 130b72d6c5734f8acaac0214b6dfe5c8bfa319c3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package com.example.demo.model.mall;
 
import xyz.erupt.annotation.Erupt;
import xyz.erupt.annotation.EruptField;
import xyz.erupt.annotation.sub_field.Edit;
import xyz.erupt.annotation.sub_field.View;
import xyz.erupt.jpa.model.BaseModel;
 
import javax.persistence.Entity;
import javax.persistence.Table;
 
@Erupt(name = "商品型号")
@Table(name = "mall_goods_spec")
@Entity
public class GoodsSpec extends BaseModel {
 
    @EruptField(
            views = @View(title = "名称"),
            edit = @Edit(title = "名称", notNull = true)
    )
    private String name;
 
    @EruptField(
            views = @View(title = "价格"),
            edit = @Edit(title = "价格", notNull = true)
    )
    private Double price;
 
    @EruptField(
            views = @View(title = "库存"),
            edit = @Edit(title = "库存", notNull = true)
    )
    private Integer inventory;
}