Commit 91224be1 authored by sumet's avatar sumet

test

parent 9444a934
package controllers;
import models.Computer;
import models.Thai;
import play.data.Form;
import play.data.FormFactory;
import play.libs.concurrent.HttpExecutionContext;
......@@ -13,8 +12,6 @@ import repository.ComputerRepository;
import javax.inject.Inject;
import javax.persistence.PersistenceException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletionStage;
......@@ -53,12 +50,6 @@ public class HomeController extends Controller {
return GO_HOME;
}
public Result thai(){
List<Thai> Thailand = new ArrayList<>();
Thailand=Thai.find.all();
return ok(views.html.thai.render(Thailand));
}
/**
* Display the paginated list of computers.
*
......
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- First database schema
# --- !Ups
create table company (
id bigint auto_increment not null,
id bigint not null,
name varchar(255),
constraint pk_company primary key (id)
);
constraint pk_company primary key (id))
;
create table computer (
id bigint auto_increment not null,
id bigint not null,
name varchar(255),
introduced timestamp,
discontinued timestamp,
company_id bigint,
constraint pk_computer primary key (id)
);
constraint pk_computer primary key (id))
;
create table thai (
id bigint auto_increment not null,
coun varchar(255),
prov varchar(255),
constraint pk_thai primary key (id)
);
create sequence company_seq start with 1000;
alter table computer add constraint fk_computer_company_id foreign key (company_id) references company (id) on delete restrict on update restrict;
create index ix_computer_company_id on computer (company_id);
create sequence computer_seq start with 1000;
alter table computer add constraint fk_computer_company_1 foreign key (company_id) references company (id) on delete restrict on update restrict;
create index ix_computer_company_1 on computer (company_id);
# --- !Downs
alter table computer drop constraint if exists fk_computer_company_id;
drop index if exists ix_computer_company_id;
SET REFERENTIAL_INTEGRITY FALSE;
drop table if exists company;
drop table if exists computer;
drop table if exists thai;
SET REFERENTIAL_INTEGRITY TRUE;
drop sequence if exists company_seq;
drop sequence if exists computer_seq;
......@@ -5,8 +5,6 @@
# Default path will just redirect to the computer list
GET / controllers.HomeController.index()
GET /thai controllers.HomeController.thai()
# Computers list (look at the default values for pagination parameters)
GET /computers controllers.HomeController.list(p:Int ?= 0, s ?= "name", o ?= "asc", f ?= "")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment