From 9f85062ce72fe844256145a6726c044220bdd009 Mon Sep 17 00:00:00 2001 From: snoop Date: Fri, 28 Jul 2017 11:02:17 +0900 Subject: [PATCH] fixed probe authorized -> authorize --- .../overflow/module/probe/model/Probe.java | 24 +++++++++---------- src/main/resources/init.sql | 2 +- .../probe/service/ProbeServiceTest.java | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/main/java/com/loafle/overflow/module/probe/model/Probe.java b/src/main/java/com/loafle/overflow/module/probe/model/Probe.java index e38c891..05f12af 100644 --- a/src/main/java/com/loafle/overflow/module/probe/model/Probe.java +++ b/src/main/java/com/loafle/overflow/module/probe/model/Probe.java @@ -48,8 +48,8 @@ status (Meta) private int sensorCount; private String displayName; private String cidr; - private Date authorizedDate; - private Member authorizedMember; + private Date authorizeDate; + private Member authorizeMember; private InfraHost infraHost; @Id @@ -159,23 +159,23 @@ status (Meta) } @Temporal(TemporalType.TIMESTAMP) - @Column(name = "AUTHORIZED_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false) - public Date getAuthorizedDate() { - return authorizedDate; + @Column(name = "AUTHORIZE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false) + public Date getAuthorizeDate() { + return authorizeDate; } - public void setAuthorizedDate(Date authorizedDate) { - this.authorizedDate = authorizedDate; + public void setAuthorizeDate(Date authorizeDate) { + this.authorizeDate = authorizeDate; } @ManyToOne - @JoinColumn(name = "MEMBER_ID", nullable = false) - public Member getAuthorizedMember() { - return authorizedMember; + @JoinColumn(name = "AUTHORIZE_MEMBER_ID", nullable = false) + public Member getAuthorizeMember() { + return authorizeMember; } - public void setAuthorizedMember(Member authorizedMember) { - this.authorizedMember = authorizedMember; + public void setAuthorizeMember(Member authorizeMember) { + this.authorizeMember = authorizeMember; } @ManyToOne diff --git a/src/main/resources/init.sql b/src/main/resources/init.sql index 2c9579a..ed1ba58 100644 --- a/src/main/resources/init.sql +++ b/src/main/resources/init.sql @@ -416,7 +416,7 @@ INSERT INTO public.infra (id,child_id,create_date,type_id) VALUES ( INSERT INTO public.infra (id,child_id,create_date,type_id) VALUES ( 3,1,'2017-07-27 20:10:41.506',2); -INSERT INTO public.probe (id,authorized_date,cidr,create_date,description,display_name,encryption_key,probe_key,sensor_count,target_count,member_id,domain_id,host_id,status) VALUES ( +INSERT INTO public.probe (id,authorize_date,cidr,create_date,description,display_name,encryption_key,probe_key,sensor_count,target_count,authorize_member_id,domain_id,host_id,status) VALUES ( 1,'2017-07-27 20:01:28.513','192.168.1.0/24','2017-07-27 20:01:28.513','snoop probe','test probe','8c51fa9c5bcc11e7980a080027658d13','899fdd145bcc11e7b611080027658d13',0,0,1,1,1,1); INSERT INTO public.target (id,create_date,description,display_name) VALUES ( diff --git a/src/test/java/com/loafle/overflow/module/probe/service/ProbeServiceTest.java b/src/test/java/com/loafle/overflow/module/probe/service/ProbeServiceTest.java index 42e6db8..ca2e241 100644 --- a/src/test/java/com/loafle/overflow/module/probe/service/ProbeServiceTest.java +++ b/src/test/java/com/loafle/overflow/module/probe/service/ProbeServiceTest.java @@ -61,7 +61,7 @@ public class ProbeServiceTest { Member member = new Member(); member.setId(1l); - probe.setAuthorizedMember(member); + probe.setAuthorizeMember(member); InfraHost infraHost = new InfraHost(); infraHost.setId(1);