package com.itheima.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;
import java.util.UUID;

/*****
 * @Author: http://www.itheima.com
 * @Description: com.itheima.domain.MoneyLog
 ****/
@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class MoneyLog implements Serializable {

    private String id;
    private Double money;
    private Date createtime;
    private String username;

    public MoneyLog(Double money, String username) {
        this.money = money;
        this.username = username;
        this.id= UUID.randomUUID().toString();
        this.createtime = new Date();
    }
}
