evenement_struct.dart 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416
  1. // ignore_for_file: unnecessary_getters_setters
  2. import '/backend/schema/util/schema_util.dart';
  3. import 'index.dart';
  4. import '/flutter_flow/flutter_flow_util.dart';
  5. class EvenementStruct extends BaseStruct {
  6. EvenementStruct({
  7. int? nid,
  8. String? titel,
  9. DateTime? datum,
  10. String? logo,
  11. String? adres,
  12. String? plaats,
  13. String? categorie,
  14. String? horecagelegenheid,
  15. int? horecagelegenheidid,
  16. String? inhoud,
  17. String? url,
  18. }) : _nid = nid,
  19. _titel = titel,
  20. _datum = datum,
  21. _logo = logo,
  22. _adres = adres,
  23. _plaats = plaats,
  24. _categorie = categorie,
  25. _horecagelegenheid = horecagelegenheid,
  26. _horecagelegenheidid = horecagelegenheidid,
  27. _inhoud = inhoud,
  28. _url = url;
  29. // "nid" field.
  30. int? _nid;
  31. int get nid => _nid ?? 0;
  32. set nid(int? val) {
  33. _nid = val;
  34. debugLog();
  35. }
  36. void incrementNid(int amount) => nid = nid + amount;
  37. bool hasNid() => _nid != null;
  38. // "titel" field.
  39. String? _titel;
  40. String get titel => _titel ?? '';
  41. set titel(String? val) {
  42. _titel = val;
  43. debugLog();
  44. }
  45. bool hasTitel() => _titel != null;
  46. // "datum" field.
  47. DateTime? _datum;
  48. DateTime? get datum => _datum;
  49. set datum(DateTime? val) {
  50. _datum = val;
  51. debugLog();
  52. }
  53. bool hasDatum() => _datum != null;
  54. // "logo" field.
  55. String? _logo;
  56. String get logo => _logo ?? '';
  57. set logo(String? val) {
  58. _logo = val;
  59. debugLog();
  60. }
  61. bool hasLogo() => _logo != null;
  62. // "adres" field.
  63. String? _adres;
  64. String get adres => _adres ?? '';
  65. set adres(String? val) {
  66. _adres = val;
  67. debugLog();
  68. }
  69. bool hasAdres() => _adres != null;
  70. // "plaats" field.
  71. String? _plaats;
  72. String get plaats => _plaats ?? '';
  73. set plaats(String? val) {
  74. _plaats = val;
  75. debugLog();
  76. }
  77. bool hasPlaats() => _plaats != null;
  78. // "categorie" field.
  79. String? _categorie;
  80. String get categorie => _categorie ?? '';
  81. set categorie(String? val) {
  82. _categorie = val;
  83. debugLog();
  84. }
  85. bool hasCategorie() => _categorie != null;
  86. // "horecagelegenheid" field.
  87. String? _horecagelegenheid;
  88. String get horecagelegenheid => _horecagelegenheid ?? '';
  89. set horecagelegenheid(String? val) {
  90. _horecagelegenheid = val;
  91. debugLog();
  92. }
  93. bool hasHorecagelegenheid() => _horecagelegenheid != null;
  94. // "horecagelegenheidid" field.
  95. int? _horecagelegenheidid;
  96. int get horecagelegenheidid => _horecagelegenheidid ?? 0;
  97. set horecagelegenheidid(int? val) {
  98. _horecagelegenheidid = val;
  99. debugLog();
  100. }
  101. void incrementHorecagelegenheidid(int amount) =>
  102. horecagelegenheidid = horecagelegenheidid + amount;
  103. bool hasHorecagelegenheidid() => _horecagelegenheidid != null;
  104. // "inhoud" field.
  105. String? _inhoud;
  106. String get inhoud => _inhoud ?? '';
  107. set inhoud(String? val) {
  108. _inhoud = val;
  109. debugLog();
  110. }
  111. bool hasInhoud() => _inhoud != null;
  112. // "url" field.
  113. String? _url;
  114. String get url => _url ?? '';
  115. set url(String? val) {
  116. _url = val;
  117. debugLog();
  118. }
  119. bool hasUrl() => _url != null;
  120. static EvenementStruct fromMap(Map<String, dynamic> data) => EvenementStruct(
  121. nid: castToType<int>(data['nid']),
  122. titel: data['titel'] as String?,
  123. datum: data['datum'] as DateTime?,
  124. logo: data['logo'] as String?,
  125. adres: data['adres'] as String?,
  126. plaats: data['plaats'] as String?,
  127. categorie: data['categorie'] as String?,
  128. horecagelegenheid: data['horecagelegenheid'] as String?,
  129. horecagelegenheidid: castToType<int>(data['horecagelegenheidid']),
  130. inhoud: data['inhoud'] as String?,
  131. url: data['url'] as String?,
  132. );
  133. static EvenementStruct? maybeFromMap(dynamic data) => data is Map
  134. ? EvenementStruct.fromMap(data.cast<String, dynamic>())
  135. : null;
  136. Map<String, dynamic> toMap() => {
  137. 'nid': _nid,
  138. 'titel': _titel,
  139. 'datum': _datum,
  140. 'logo': _logo,
  141. 'adres': _adres,
  142. 'plaats': _plaats,
  143. 'categorie': _categorie,
  144. 'horecagelegenheid': _horecagelegenheid,
  145. 'horecagelegenheidid': _horecagelegenheidid,
  146. 'inhoud': _inhoud,
  147. 'url': _url,
  148. }.withoutNulls;
  149. @override
  150. Map<String, dynamic> toSerializableMap() => {
  151. 'nid': serializeParam(
  152. _nid,
  153. ParamType.int,
  154. ),
  155. 'titel': serializeParam(
  156. _titel,
  157. ParamType.String,
  158. ),
  159. 'datum': serializeParam(
  160. _datum,
  161. ParamType.DateTime,
  162. ),
  163. 'logo': serializeParam(
  164. _logo,
  165. ParamType.String,
  166. ),
  167. 'adres': serializeParam(
  168. _adres,
  169. ParamType.String,
  170. ),
  171. 'plaats': serializeParam(
  172. _plaats,
  173. ParamType.String,
  174. ),
  175. 'categorie': serializeParam(
  176. _categorie,
  177. ParamType.String,
  178. ),
  179. 'horecagelegenheid': serializeParam(
  180. _horecagelegenheid,
  181. ParamType.String,
  182. ),
  183. 'horecagelegenheidid': serializeParam(
  184. _horecagelegenheidid,
  185. ParamType.int,
  186. ),
  187. 'inhoud': serializeParam(
  188. _inhoud,
  189. ParamType.String,
  190. ),
  191. 'url': serializeParam(
  192. _url,
  193. ParamType.String,
  194. ),
  195. }.withoutNulls;
  196. static EvenementStruct fromSerializableMap(Map<String, dynamic> data) =>
  197. EvenementStruct(
  198. nid: deserializeParam(
  199. data['nid'],
  200. ParamType.int,
  201. false,
  202. ),
  203. titel: deserializeParam(
  204. data['titel'],
  205. ParamType.String,
  206. false,
  207. ),
  208. datum: deserializeParam(
  209. data['datum'],
  210. ParamType.DateTime,
  211. false,
  212. ),
  213. logo: deserializeParam(
  214. data['logo'],
  215. ParamType.String,
  216. false,
  217. ),
  218. adres: deserializeParam(
  219. data['adres'],
  220. ParamType.String,
  221. false,
  222. ),
  223. plaats: deserializeParam(
  224. data['plaats'],
  225. ParamType.String,
  226. false,
  227. ),
  228. categorie: deserializeParam(
  229. data['categorie'],
  230. ParamType.String,
  231. false,
  232. ),
  233. horecagelegenheid: deserializeParam(
  234. data['horecagelegenheid'],
  235. ParamType.String,
  236. false,
  237. ),
  238. horecagelegenheidid: deserializeParam(
  239. data['horecagelegenheidid'],
  240. ParamType.int,
  241. false,
  242. ),
  243. inhoud: deserializeParam(
  244. data['inhoud'],
  245. ParamType.String,
  246. false,
  247. ),
  248. url: deserializeParam(
  249. data['url'],
  250. ParamType.String,
  251. false,
  252. ),
  253. );
  254. @override
  255. Map<String, DebugDataField> toDebugSerializableMap() => {
  256. 'nid': debugSerializeParam(
  257. nid,
  258. ParamType.int,
  259. name: 'int',
  260. nullable: false,
  261. ),
  262. 'titel': debugSerializeParam(
  263. titel,
  264. ParamType.String,
  265. name: 'String',
  266. nullable: false,
  267. ),
  268. 'datum': debugSerializeParam(
  269. _datum,
  270. ParamType.DateTime,
  271. name: 'DateTime',
  272. nullable: true,
  273. ),
  274. 'logo': debugSerializeParam(
  275. logo,
  276. ParamType.String,
  277. name: 'String',
  278. nullable: false,
  279. ),
  280. 'adres': debugSerializeParam(
  281. adres,
  282. ParamType.String,
  283. name: 'String',
  284. nullable: false,
  285. ),
  286. 'plaats': debugSerializeParam(
  287. plaats,
  288. ParamType.String,
  289. name: 'String',
  290. nullable: false,
  291. ),
  292. 'categorie': debugSerializeParam(
  293. categorie,
  294. ParamType.String,
  295. name: 'String',
  296. nullable: false,
  297. ),
  298. 'horecagelegenheid': debugSerializeParam(
  299. horecagelegenheid,
  300. ParamType.String,
  301. name: 'String',
  302. nullable: false,
  303. ),
  304. 'horecagelegenheidid': debugSerializeParam(
  305. horecagelegenheidid,
  306. ParamType.int,
  307. name: 'int',
  308. nullable: false,
  309. ),
  310. 'inhoud': debugSerializeParam(
  311. inhoud,
  312. ParamType.String,
  313. name: 'String',
  314. nullable: false,
  315. ),
  316. 'url': debugSerializeParam(
  317. url,
  318. ParamType.String,
  319. name: 'String',
  320. nullable: false,
  321. ),
  322. };
  323. @override
  324. String toString() => 'EvenementStruct(${toMap()})';
  325. @override
  326. bool operator ==(Object other) {
  327. return other is EvenementStruct &&
  328. nid == other.nid &&
  329. titel == other.titel &&
  330. datum == other.datum &&
  331. logo == other.logo &&
  332. adres == other.adres &&
  333. plaats == other.plaats &&
  334. categorie == other.categorie &&
  335. horecagelegenheid == other.horecagelegenheid &&
  336. horecagelegenheidid == other.horecagelegenheidid &&
  337. inhoud == other.inhoud &&
  338. url == other.url;
  339. }
  340. @override
  341. int get hashCode => const ListEquality().hash([
  342. nid,
  343. titel,
  344. datum,
  345. logo,
  346. adres,
  347. plaats,
  348. categorie,
  349. horecagelegenheid,
  350. horecagelegenheidid,
  351. inhoud,
  352. url
  353. ]);
  354. }
  355. EvenementStruct createEvenementStruct({
  356. int? nid,
  357. String? titel,
  358. DateTime? datum,
  359. String? logo,
  360. String? adres,
  361. String? plaats,
  362. String? categorie,
  363. String? horecagelegenheid,
  364. int? horecagelegenheidid,
  365. String? inhoud,
  366. String? url,
  367. }) =>
  368. EvenementStruct(
  369. nid: nid,
  370. titel: titel,
  371. datum: datum,
  372. logo: logo,
  373. adres: adres,
  374. plaats: plaats,
  375. categorie: categorie,
  376. horecagelegenheid: horecagelegenheid,
  377. horecagelegenheidid: horecagelegenheidid,
  378. inhoud: inhoud,
  379. url: url,
  380. );