Slide 43
Slide 43 text
Copyright ©2016, NC Design & Consulting Co., Ltd. All rights reserved. 43
Project, Report, Contact, Customerなどの
データ定義は画⾯のソースコードに記述すると
バックエンドサーバー内にもデータベースが⾃動⽣成
angular.module("app")
.factory("Customer", ["AppPot", function(AppPot) {
var customer = AppPot.defineModel("customer", {
"customerId": {
type: AppPot.DataType.Varchar
},
"name": {
type: AppPot.DataType.Varchar
},
"zip": {
type: AppPot.DataType.Varchar
},
"address": {
type: AppPot.DataType.Varchar
},
"phone": {
type: AppPot.DataType.Varchar
},
"sex": {
type: AppPot.DataType.Long
}
});
return customer;
}]);