Skip to content

Instantly share code, notes, and snippets.

View ryan2clw's full-sized avatar

Ryan Dines ryan2clw

  • Tampa, FL
View GitHub Profile
@ryan2clw
ryan2clw / models.py
Created August 17, 2019 12:33
Model for card data
""" Generates SQL tables for Cards and Rows """
from django.db import models
class Card(models.Model):
""" A bingo card with 5 rows. """
created_on = models.DateTimeField(auto_now_add=True)
def __str__(self):
return "Card: " + str(self.id) + ", " + str(self.created_on)
@ryan2clw
ryan2clw / cards.tsx
Last active August 24, 2019 22:30
Card action and reducer
import { actionTypes } from './actionTypes';
import { action as act } from 'typesafe-actions'
import { getCards } from '../webservices/bingoService';
import { Reducer, AnyAction } from 'redux'
import { Dispatch } from 'react';
import { danger, clear } from './messages';
/* Card Interface */
export interface ICardArray {