package com.example.reminder_proj01;

import android.content.ContentValues;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;

public class AlarmTime 
{
	
	public static final String TABLE_NAME = "alarmtime";
	public static final String COL_ID = "_id";
	public static final String COL_ALARMID = "alarm_id";
	public static final String COL_AT = "at";

	static String Sql_table() 
	{
		return Util.concat("CREATE TABLE ", TABLE_NAME, " (",
				COL_ID, " INTEGER PRIMARY KEY AUTOINCREMENT, ",
				COL_ALARMID, " INTEGER, ",
				COL_AT, " INTEGER",
				");");
	}
	
	long save(SQLiteDatabase db)
	{
		ContentValues cv = new ContentValues();
		cv.put(COL_ALARMID, alarmId);
		cv.put(COL_AT, at);
		
		return db.insert(TABLE_NAME, null, cv);
	}
	
	
	private long alarmId;
	private String at;
	
	protected long id;
	
	public void reset() 
	{
		alarmId = 0;
		at = null;
	}

	public long getAlarmId() 
	{
		return alarmId;
	}
	public void setAlarmId(long alarmId)
	{
		this.alarmId = alarmId;
	}
	public String getAt()
	{
		return at;
	}
	public void setAt(String at)
	{
		this.at = at;
	}
	
	public AlarmTime() {}
	
	public AlarmTime(long id) 
	{
		this.id = id;
	}
	
	
}
