-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
94 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package ru.ylab.model; | ||
|
||
import lombok.Builder; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
@Builder | ||
public record AuditionEventModel ( | ||
Long id, | ||
Long userId, | ||
Long typeId, | ||
String message, | ||
LocalDateTime date | ||
) { | ||
public static class SubmissionModelBuilder { | ||
private final LocalDateTime date = LocalDateTime.now(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package ru.ylab.model; | ||
|
||
import lombok.Builder; | ||
|
||
@Builder | ||
public record MeterModel ( | ||
Long id, | ||
String factoryNumber, | ||
Long userId, | ||
Long typeId) { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package ru.ylab.model; | ||
|
||
import lombok.Builder; | ||
|
||
@Builder | ||
public record MeterReadingModel( | ||
Long id, | ||
Long submissionId, | ||
Long meterId, | ||
Long value) { | ||
public static class MeterReadingModelBuilder { | ||
private final Long value = 0L; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package ru.ylab.model; | ||
|
||
import lombok.Builder; | ||
|
||
@Builder | ||
public record MeterTypeModel( | ||
Long id, | ||
String typeName | ||
) { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package ru.ylab.model; | ||
|
||
import lombok.Builder; | ||
|
||
import java.time.LocalDate; | ||
|
||
@Builder | ||
public record SubmissionModel( | ||
Long id, | ||
Long userId, | ||
LocalDate date) { | ||
public static class SubmissionModelBuilder { | ||
private final LocalDate date = LocalDate.now(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package ru.ylab.model; | ||
|
||
import lombok.Builder; | ||
import ru.ylab.enumerated.UserRole; | ||
|
||
@Builder | ||
public record UserModel( | ||
Long id, | ||
String name, | ||
String password, | ||
UserRole role) { | ||
|
||
public static class UserModelBuilder { | ||
private final UserRole role = UserRole.USER; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters