package me.chyxion.tigon.model;

import lombok.Getter;
import lombok.Setter;
import me.chyxion.tigon.mybatis.NotUpdate;

/**
 * @version 0.0.1
 * @since 0.0.1
 * @author Shaun Chyxion <br>
 * chyxion@163.com <br>
 * Sep 29, 2016 6:02:11 PM
 */
@Getter
@Setter
public class M0<Id> extends BaseModel<Id> {
    private static final long serialVersionUID = 1L;

    @NotUpdate
    protected Id id;

    /**
     * {@inheritDoc}
     */
    @Override
    public String primaryKeyName() {
        return ID;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public Id primaryKeyValue() {
        return id;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void primaryKeyValue(Id id) {
        this.id = id;
    }
}
