use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Debug)]
struct Config {
host: String,
port: u16,
<?php
namespace App\Http\Resources\V1;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\ResourceCollection;
package domain
import "time"
type DomainEvent interface {
EventName() string
module Api
module V1
class UsersController < ApplicationController
before_action :authenticate_user!, except: [:index, :show]
before_action :set_user, only: [:show, :update, :destroy]
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct CancelReason {
pub reason: String,
pub feedback: Option<String>,
module Paginatable
extend ActiveSupport::Concern
Page = Struct.new(:records, :next_cursor, keyword_init: true)
DEFAULT_LIMIT = 25
use std::io::{self, Read, Write};
pub const HEADER_LEN: usize = 8; // 4-byte length + 4-byte crc
#[derive(Debug)]
pub enum DecodeError {
import { NestFactory } from '@nestjs/core';
import { ValidationPipe } from '@nestjs/common';
import { AppModule } from './app.module';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
package api
import (
"encoding/json"
"encoding/xml"
"net/http"
class User < ApplicationRecord
normalizes :phone, with: ->(value) { PhoneNormalizer.call(value) }, apply_to_nil: false
validates :phone,
presence: true,
uniqueness: { case_sensitive: false },