summaryrefslogtreecommitdiff
path: root/game/shared/portal/portal_gcschema.cpp
blob: ece8e6c1986dda8d9149f434e0507a1a5808c3ad (plain) (blame)
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
//========= Copyright Valve Corporation, All rights reserved. ============//
// -------------------------------------------------------
// DO NOT EDIT
//   This file was generated from portal\portal_gcschema.sch by SchemaCompiler.EXE
//		on Mon Feb 22 13:22:55 2010
// -------------------------------------------------------

#include "cbase.h"
#include "portal_gcschema.h"

CSchGameAccount::CSchGameAccount()
{
	memset( PubRecordFixed(), 0, CubRecordFixed() );
}
int CSchGameAccount::GetITable() const { return k_iTable; }
CSchGameAccount::CSchGameAccount( const CSchGameAccount &that ) { *this = that; }
void CSchGameAccount::operator=( const CSchGameAccount &that ) { CRecordBase::operator =( that ); }


CSchGameAccountClient::CSchGameAccountClient()
{
	memset( PubRecordFixed(), 0, CubRecordFixed() );
}
int CSchGameAccountClient::GetITable() const { return k_iTable; }
CSchGameAccountClient::CSchGameAccountClient( const CSchGameAccountClient &that ) { *this = that; }
void CSchGameAccountClient::operator=( const CSchGameAccountClient &that ) { CRecordBase::operator =( that ); }


// statics for index IDs

int CSchGameAccount::m_nPrimaryKeyID;
int CSchGameAccountClient::m_nPrimaryKeyID;

// other initializers


// run-time initializer

namespace PORTAL_GCSCHEMA
{
void GenerateIntrinsicSQLSchema( GCSDK::CSchemaFull &schemaFull )
{
	GCSDK::CSchema *pSchema;
	pSchema = schemaFull.AddNewSchema();
	schemaFull.SetITable( pSchema, CSchGameAccount::k_iTable ); // 0
	pSchema->SetESchemaCatalog( GCSDK::k_ESchemaCatalogMain );
	pSchema->SetName( "GameAccount" );
	pSchema->EnsureFieldCount( CSchGameAccount::k_iFieldMax );
	pSchema->SetReportingInterval( 0 );
	pSchema->AddField( "unAccountID", "AccountID", k_EGCSQLType_int32, sizeof( uint32 ), 0, true, 0 );
	pSchema->AddField( "unRewardPoints", "RewardPoints", k_EGCSQLType_int32, sizeof( uint32 ), 0, true, 0 );
	pSchema->AddField( "unPointCap", "PointCap", k_EGCSQLType_int32, sizeof( uint32 ), 0, true, 0 );
	pSchema->AddField( "unLastCapRollover", "LastCapRollover", k_EGCSQLType_int32, sizeof( RTime32 ), 0, true, 0 );
	CSchGameAccount::m_nPrimaryKeyID = pSchema->PrimaryKey( true, 100, "unAccountID" );
	pSchema->SetTestWipePolicy( GCSDK::k_EWipePolicyWipeForAllTests );
	pSchema->SetBAllowWipeTableInProd( false );
	pSchema->CalcOffsets();
	schemaFull.CheckSchema( pSchema, CSchGameAccount::k_iFieldMax, sizeof( CSchGameAccount ) - sizeof( GCSDK::CRecordBase ) );
	pSchema->PrepareForUse();

	pSchema = schemaFull.AddNewSchema();
	schemaFull.SetITable( pSchema, CSchGameAccountClient::k_iTable ); // 1
	pSchema->SetESchemaCatalog( GCSDK::k_ESchemaCatalogMain );
	pSchema->SetName( "GameAccountClient" );
	pSchema->EnsureFieldCount( CSchGameAccountClient::k_iFieldMax );
	pSchema->SetReportingInterval( 0 );
	pSchema->AddField( "unAccountID", "AccountID", k_EGCSQLType_int32, sizeof( uint32 ), 0, true, 0 );
	CSchGameAccountClient::m_nPrimaryKeyID = pSchema->PrimaryKey( true, 80, "unAccountID" );
	pSchema->SetTestWipePolicy( GCSDK::k_EWipePolicyWipeForAllTests );
	pSchema->SetBAllowWipeTableInProd( false );
	pSchema->CalcOffsets();
	schemaFull.CheckSchema( pSchema, CSchGameAccountClient::k_iFieldMax, sizeof( CSchGameAccountClient ) - sizeof( GCSDK::CRecordBase ) );
	pSchema->PrepareForUse();


	schemaFull.FinishInit();
}
} // namespace