1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<?php
/**
* VolunteerEventDat Entity
* $Id: VolunteerEventDat.inc,v 1.1 2020/2/27 14:40:01 Exp $
* @author zb
* @package jp.compass.entity
* @access public
*/
class VolunteerEventDat extends CompassDynamicData
{
var $title;
var $comment;
var $start_time;
var $finish_time;
var $enroll_time;
var $front_image;
var $position;
var $position_longitude;
var $position_latitude;
var $account_id;
var $author;
var $author_role;
var $school_no;
var $original_source;
var $province;
var $city;
var $district;
var $include_social_user;
var $max_member;
var $member_count;
var $time_length;
var $leader_name;
var $leader_contact;
var $venue;
var $venue_time;
var $status;
var $delete_flg;
/**
* 构造实现。volunteer_event_dat创建实例。
*
* @access public
* @param mixed volunteer_event_dat
*/
function constructor($record)
{
parent::constructor($record);
$this->title = $record["title"];
$this->comment = $record["comment"];
$this->start_time = $record["start_time"];
$this->finish_time = $record["finish_time"];
$this->enroll_time = $record["enroll_time"];
$this->front_image = $record["front_image"];
$this->position = $record["position"];
$this->position_longitude = $record["position_longitude"];
$this->position_latitude = $record["position_latitude"];
$this->account_id = $record["account_id"];
$this->author = $record["author"];
$this->author_role = $record["author_role"];
$this->school_no = $record["school_no"];
$this->original_source = $record["original_source"];
$this->province = $record["province"];
$this->city = $record["city"];
$this->district = $record["district"];
$this->include_social_user = $record["include_social_user"];
$this->max_member = $record["max_member"];
$this->member_count = $record["member_count"];
$this->time_length = $record["time_length"];
$this->leader_name = $record["leader_name"];
$this->leader_contact = $record["leader_contact"];
$this->venue = $record["venue"];
$this->venue_time = $record["venue_time"];
$this->status = $record["status"];
$this->delete_flg = $record["delete_flg"];
}
/**
* 根据条件,获取数据列表。
* 条件与DBManager的doSelect相同。
* @access public
* @static
* @param array 检索条件
* @return array Entity的队列
*/
public static function getList($w_param = null, $orderkey = null, $direction = "ASC", $offset = null, $limit = null)
{
if ($w_param == null) {
$w_param = array();
$w_param["delete_flg"] = "false";
}
return CompassDBHandler::getList("VolunteerEventDat", "volunteer_event_dat", $w_param, $orderkey, $direction, $offset, $limit);
}
/**
* 根据条件,获取数据列表的件数。
* 条件与DBManager的doSelect相同。
* @access public
* @static
* @param array 检索条件
* @return array Entity的队列
*/
public static function getListCount($w_param = null)
{
if ($w_param == null) {
$w_param = array();
$w_param["delete_flg"] = "false";
}
$db = CompassDBManager::getInstance();
$result = $db->doSelect("volunteer_event_dat", $w_param, null, null, null, null, "count(*) as count");
return $result[0]["count"];
}
/**
* 获得此类指定ID的实例。
*/
public static function getById($id)
{
// delete_flg
$param = array();
$param["delete_flg"] = false;
return CompassDBHandler::getById("VolunteerEventDat", "volunteer_event_dat", $id, $param);
}
// -- 这里开始Dynamic ---
/**
* 将此实例写入DB。
* DynamicData共用的保存方法。
* @access public
* @return int 写入实例的ID
*/
public function save()
{
$v_param = array();
ParamUtil::copyObj2Array($v_param, $this, "title");
ParamUtil::copyObj2Array($v_param, $this, "comment");
ParamUtil::copyObj2Array($v_param, $this, "start_time");
ParamUtil::copyObj2Array($v_param, $this, "finish_time");
ParamUtil::copyObj2Array($v_param, $this, "enroll_time");
ParamUtil::copyObj2Array($v_param, $this, "front_image");
ParamUtil::copyObj2Array($v_param, $this, "position");
ParamUtil::copyObj2Array($v_param, $this, "position_longitude");
ParamUtil::copyObj2Array($v_param, $this, "position_latitude");
ParamUtil::copyObj2Array($v_param, $this, "account_id");
ParamUtil::copyObj2Array($v_param, $this, "author");
ParamUtil::copyObj2Array($v_param, $this, "author_role");
ParamUtil::copyObj2Array($v_param, $this, "school_no");
ParamUtil::copyObj2Array($v_param, $this, "original_source");
ParamUtil::copyObj2ArrayNullField($v_param, $this, "province");
ParamUtil::copyObj2ArrayNullField($v_param, $this, "city");
ParamUtil::copyObj2ArrayNullField($v_param, $this, "district");
ParamUtil::copyObj2Array($v_param, $this, "include_social_user");
ParamUtil::copyObj2Array($v_param, $this, "max_member");
ParamUtil::copyObj2Array($v_param, $this, "member_count");
ParamUtil::copyObj2Array($v_param, $this, "time_length");
ParamUtil::copyObj2Array($v_param, $this, "leader_name");
ParamUtil::copyObj2Array($v_param, $this, "leader_contact");
ParamUtil::copyObj2Array($v_param, $this, "venue");
ParamUtil::copyObj2Array($v_param, $this, "venue_time");
ParamUtil::copyObj2Array($v_param, $this, "status");
ParamUtil::copyObj2Array($v_param, $this, "delete_flg");
// 保存
parent::_save("volunteer_event_dat", $v_param);
}
}