This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @Title GetContestants | |
// @Description Get list contestant for specific campaign | |
// @Success 200 success | |
// @Param X-Tenant=>tenantID header string true "tenant id" | |
// @Param page query int 1 false "active page" | |
// @router /:campaignID/contestants [get] | |
func (c *AdminContestantController) GetContestants(page int, tenantID string, campaignID int) *jsonapi.JsonAPIResponse { | |
totalPage, err := c.contestantHandler.GetTotalPage(campaignID) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
truncate campaign restart identity cascade |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- https://medium.com/google-cloud/yet-another-way-to-generate-fake-datasets-in-bigquery-93ee87c1008f | |
CREATE TEMP FUNCTION entity(seed INT64) | |
RETURNS STRUCT<transaction_id String, user_id Integer, transaction_date String, ledger_type String, points Integer, partner String, remarks String, country String> | |
LANGUAGE js | |
AS """ | |
var t = {}; | |
var items = [100,150,200,250,300,350,400] | |
var countries = ["sg", "id"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
from shapely.geometry import Point | |
from shapely.geometry.polygon import Polygon | |
# data trip of users | |
# id, driverId, userId, amount, rideType, latOrigin, longOrigin, latDestination, longDestination, distance, createdAt, finishedAt | |
trips = [ | |
[1,"b83c50be-4b17-405a-8885-f46b1cb12beb","0911d670-cb99-4000-9cae-c082c1c98c95", 12000, 1, -6.2812861, 107.0149711, 6.246310, 107.018128, 2.3, "2023-08-20 10:10:10", "2023-08-20 10:25:10"], | |
[2,"x123dda-4we7-ss5a-9985-xxeweb12beb","0911d670-cb99-4000-9cae-c082c1c98c95", 15000, 1, -6.2023535,106.8150157, -6.2273916,106.8043289, 1.5, "2023-08-20 11:10:10", "2023-08-20 11:45:10"], | |
[3,"d312fabd-2f65-493b-93d0-67a1a31d4e6e","0911d670-cb99-4000-9cae-c082c1c98c95", 35000, 2, -6.2273916,106.8043289, -6.2271669,106.7945101, 2.9, "2023-08-20 18:10:10", "2023-08-20 18:30:10"], |
OlderNewer